From 49a50952fb29fbaf544f8e947218fe16a479a0be Mon Sep 17 00:00:00 2001 From: Jiri Moskovcak Date: Fri, 10 Jun 2011 12:44:48 +0200 Subject: pyhook: moved import syslog from module scope into the callsites that use it rhbz#672043 - fixes build of python when ABRT is installed --- src/hooks/abrt_exception_handler.py.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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: -- cgit