mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 18:11:28 +01:00
pylightning: Handle empty log lines correctly
Logging an empty line (without newline character) would raise an Exception due to out of bounds check. Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
parent
5d05694920
commit
1c8b980985
@ -343,7 +343,7 @@ class PluginStream(object):
|
||||
def write(self, payload):
|
||||
self.buff += payload
|
||||
|
||||
if payload[-1] == '\n':
|
||||
if len(payload) > 0 and payload[-1] == '\n':
|
||||
self.flush()
|
||||
|
||||
def flush(self):
|
||||
|
Loading…
Reference in New Issue
Block a user