Skip to content

Commit a573f10

Browse files
author
vagrant
committed
Used splitlines instead of split('\n') because the latter returns a leading empty
string if the input ends with a newline. This resulted in spurious empty lines in log because of the buffering.
1 parent 935b891 commit a573f10

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

supervisor_stdout.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def main():
1919
def event_handler(event, response):
2020
line, data = response.split('\n', 1)
2121
headers = dict([ x.split(':') for x in line.split() ])
22-
lines = data.split('\n')
22+
lines = data.splitlines()
2323
prefix = '%s %s | '%(headers['processname'], headers['channel'])
2424
print '\n'.join([ prefix + l for l in lines ])
2525

0 commit comments

Comments
 (0)