Fixed an error in channel.msg. Made sure to return a deferred from tail_log_file as its documentation suggests it should.

This commit is contained in:
Griatch 2016-04-07 23:29:12 +02:00
parent 4a58fcb9f1
commit fd50eaddba
2 changed files with 2 additions and 2 deletions

View file

@ -275,7 +275,7 @@ class DefaultChannel(with_metaclass(TypeclassBase, ChannelDB)):
senders (Object or list, optional): Senders of message to send.
"""
self.msg(message, senders=senders, header=header, persistent=False)
self.msg(message, senders=senders, header=header, keep_log=False)
# hooks

View file

@ -259,7 +259,7 @@ def tail_log_file(filename, offset, nlines, callback=None):
filehandle = _open_log_file(filename)
if filehandle:
if callback:
deferToThread(seek_file, filehandle, offset, nlines, callback).addErrback(errback)
return deferToThread(seek_file, filehandle, offset, nlines, callback).addErrback(errback)
else:
return seek_file(filehandle, offset, nlines, callback)