reporting/spacewalk-report | 6 ++++++
1 file changed, 6 insertions(+)
New commits:
commit b9f2bbc46d1d4c11e4f8e1dd1abfbc27920a401d
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Mon Jan 4 12:27:29 2010 +0100
548751 - handle IOError: [Errno 32] Broken pipe when piping to head.
diff --git a/reporting/spacewalk-report b/reporting/spacewalk-report
index cd1be9e..60a79d5 100755
--- a/reporting/spacewalk-report
+++ b/reporting/spacewalk-report
@@ -27,6 +27,7 @@ try:
import os
import csv
from optparse import Option, OptionParser
+ import errno
except KeyboardInterrupt:
systemExit(-1, "\nUser interrupted process.")
@@ -189,4 +190,9 @@ if __name__ == '__main__':
# really a stub for better exception handling in the future.
sys.stderr.write("SQL error occurred, traceback follows...\n")
raise
+ except IOError, e:
+ if e.errno == errno.EPIPE:
+ sys.exit(0)
+ else:
+ raise
Show replies by date