handle stdout being closed before we're finished

This commit is contained in:
jesopo 2020-02-24 18:17:03 +00:00
parent bb975f8e60
commit 2a2fe00c4f

View file

@ -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