Created
January 24, 2016 12:54
-
-
Save sysradium/1d6fdcf10438ce45e6fa to your computer and use it in GitHub Desktop.
Resolve problem with piped python script throwing BrokenPipe exceptions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from signal import signal, SIGPIPE, SIG_DFL | |
#Ignore SIG_PIPE and don't throw exceptions on it... (http://docs.python.org/library/signal.html) | |
signal(SIGPIPE,SIG_DFL) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment