Refactor code to remove alerts as per lgtm and #1176.

This commit is contained in:
Griatch 2017-01-29 19:02:00 +01:00
parent dcde526f6d
commit 74eebfed6d
54 changed files with 226 additions and 264 deletions

View file

@ -249,6 +249,7 @@ def tail_log_file(filename, offset, nlines, callback=None):
lines_found = lines_found[-nlines-offset:-offset if offset else None]
if callback:
callback(lines_found)
return None
else:
return lines_found
@ -262,6 +263,5 @@ def tail_log_file(filename, offset, nlines, callback=None):
return deferToThread(seek_file, filehandle, offset, nlines, callback).addErrback(errback)
else:
return seek_file(filehandle, offset, nlines, callback)
else:
return None