summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiri Moskovcak <jmoskovc@redhat.com>2011-06-10 12:44:48 +0200
committerJiri Moskovcak <jmoskovc@redhat.com>2011-06-10 12:44:48 +0200
commit49a50952fb29fbaf544f8e947218fe16a479a0be (patch)
tree97fe42281680dfeb99ff3d95435d1d7e0575a53d
parent3382b1481f83cc615e35d0144e5880e4375e629b (diff)
downloadabrt-49a50952fb29fbaf544f8e947218fe16a479a0be.zip
abrt-49a50952fb29fbaf544f8e947218fe16a479a0be.tar.gz
abrt-49a50952fb29fbaf544f8e947218fe16a479a0be.tar.xz
pyhook: moved import syslog from module scope into the callsites that use it rhbz#672043
- fixes build of python when ABRT is installed
-rw-r--r--src/hooks/abrt_exception_handler.py.in4
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 d12968e..5b45fcd 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: