aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorGravatar jesopo2020-02-24 18:17:03 +0000
committerGravatar jesopo2020-02-24 18:17:03 +0000
commit2a2fe00c4fe39f2976a0b7e4339a17d86ade54ab (patch)
treec0917613fbb43b483057ad2739882798132271fb /bin
parentsupport reading from stdin in bin/bitbot-log (diff)
signature
handle stdout being closed before we're finished
Diffstat (limited to 'bin')
-rwxr-xr-xbin/bitbot-log5
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/bitbot-log b/bin/bitbot-log
index f067ff9f..73c11859 100755
--- a/bin/bitbot-log
+++ b/bin/bitbot-log
@@ -62,4 +62,7 @@ for line in lines:
printable = line
if not printable == None:
- print(printable)
+ try:
+ sys.stdout.write("%s\n" % printable)
+ except BrokenPipeError:
+ break