diff options
| author | Jiri Moskovcak <jmoskovc@redhat.com> | 2010-02-12 11:45:45 +0100 |
|---|---|---|
| committer | Jiri Moskovcak <jmoskovc@redhat.com> | 2010-02-12 11:45:45 +0100 |
| commit | e1fa46edbe469d15a4157eccca52a0a3261a2f58 (patch) | |
| tree | b38352e489a8bad62c8652091e2938e766d0116f /src/Hooks/abrt_exception_handler.py.in | |
| parent | bc7a0e7fc5dd53e691c0ddecaf47dbf4e9f284a4 (diff) | |
| parent | 3f50601035b949db58b336e693362b0dbf1c870f (diff) | |
Merge branch 'master' into rhel6
Diffstat (limited to 'src/Hooks/abrt_exception_handler.py.in')
| -rw-r--r-- | src/Hooks/abrt_exception_handler.py.in | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/Hooks/abrt_exception_handler.py.in b/src/Hooks/abrt_exception_handler.py.in index 89f3013..b5e15b8 100644 --- a/src/Hooks/abrt_exception_handler.py.in +++ b/src/Hooks/abrt_exception_handler.py.in @@ -59,8 +59,22 @@ def handleMyException((etype, value, tb)): return sys.__excepthook__(etype, value, tb) try: + import os import os.path import traceback + import errno + + # EPIPE is not a crash, it happens all the time + # Testcase: script.py | true, where script.py is: + ## #!/usr/bin/python + ## import os + ## import time + ## time.sleep(1) + ## os.write(1, "Hello\n") # print "Hello" wouldn't be the same + # + if etype == IOError or etype == OSError: + if value.errno == errno.EPIPE: + return sys.__excepthook__(etype, value, tb) # "-c" appears in this case: # $ python -c 'import sys; print "argv0 is:%s" % sys.argv[0]' |
