diff options
author | Jiri Moskovcak <jmoskovc@redhat.com> | 2011-06-10 12:44:48 +0200 |
---|---|---|
committer | Jiri Moskovcak <jmoskovc@redhat.com> | 2011-06-10 12:44:48 +0200 |
commit | 49a50952fb29fbaf544f8e947218fe16a479a0be (patch) | |
tree | 97fe42281680dfeb99ff3d95435d1d7e0575a53d /src | |
parent | 3382b1481f83cc615e35d0144e5880e4375e629b (diff) | |
download | abrt-49a50952fb29fbaf544f8e947218fe16a479a0be.tar.gz abrt-49a50952fb29fbaf544f8e947218fe16a479a0be.tar.xz abrt-49a50952fb29fbaf544f8e947218fe16a479a0be.zip |
pyhook: moved import syslog from module scope into the callsites that use it rhbz#672043
- fixes build of python when ABRT is installed
Diffstat (limited to 'src')
-rw-r--r-- | src/hooks/abrt_exception_handler.py.in | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/hooks/abrt_exception_handler.py.in b/src/hooks/abrt_exception_handler.py.in index d12968e1..5b45fcd4 100644 --- a/src/hooks/abrt_exception_handler.py.in +++ b/src/hooks/abrt_exception_handler.py.in @@ -24,7 +24,6 @@ Module for the ABRT exception handling hook import sys import os -import syslog import socket def write_dump(pid, tb): @@ -48,6 +47,7 @@ def write_dump(pid, tb): s.sendall("DONE\0") s.close() except Exception, ex: + import syslog syslog.syslog("can't communicate with ABRT daemon, is it running? %s", str(ex)) def handleMyException((etype, value, tb)): @@ -67,10 +67,10 @@ def handleMyException((etype, value, tb)): return sys.__excepthook__(etype, value, tb) try: - import os import os.path import traceback import errno + import syslog # EPIPE is not a crash, it happens all the time # Testcase: script.py | true, where script.py is: |