Catch BrokenPipeError for OSX frozen server

Fix #166
This commit is contained in:
Julien Duponchelle 2015-05-05 10:43:49 +02:00
parent 9eeb8910fb
commit 22efc7488f

View File

@ -74,6 +74,9 @@ class ColouredStreamHandler(logging.StreamHandler):
stream.write(msg)
stream.write(self.terminator)
self.flush()
# On OSX when frozen flush raise a BrokenPipeError
except BrokenPipeError:
pass
except Exception:
self.handleError(record)