Also suppress errno.EBADF for broken pipe error. Fixes
@@ -70,7 +70,7 @@ class HighlightingStream(object):
try:
yield
except IOError as err:
- if err.errno not in (errno.EPIPE, errno.EINVAL):
+ if err.errno not in (errno.EPIPE, errno.EINVAL, errno.EBADF):
raise
def flush(self):
