Skip to content

Commit

Permalink
Merge 52067df into df9366e
Browse files Browse the repository at this point in the history
  • Loading branch information
rwolfson committed Apr 12, 2017
2 parents df9366e + 52067df commit affced6
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion awslogs/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import sys
import os
import time
import errno
from datetime import datetime, timedelta
from collections import deque

Expand Down Expand Up @@ -182,7 +183,15 @@ def consumer():
output.append(message.rstrip())

print(' '.join(output))
sys.stdout.flush()
try:
sys.stdout.flush()
except IOError as e:
if e.errno == errno.EPIPE:
# SIGPIPE received, so exit
os._exit(0)
else:
# We don't want to handle any other errors from this
raise
try:
consumer()
except KeyboardInterrupt:
Expand Down

0 comments on commit affced6

Please sign in to comment.