handle stdout being closed before we're finished
This commit is contained in:
parent
bb975f8e60
commit
2a2fe00c4f
1 changed files with 4 additions and 1 deletions
|
@ -62,4 +62,7 @@ for line in lines:
|
||||||
printable = line
|
printable = line
|
||||||
|
|
||||||
if not printable == None:
|
if not printable == None:
|
||||||
print(printable)
|
try:
|
||||||
|
sys.stdout.write("%s\n" % printable)
|
||||||
|
except BrokenPipeError:
|
||||||
|
break
|
||||||
|
|
Loading…
Reference in a new issue