diff options
author | Jiri Moskovcak <jmoskovc@redhat.com> | 2009-08-12 10:55:24 +0200 |
---|---|---|
committer | Jiri Moskovcak <jmoskovc@redhat.com> | 2009-08-12 10:55:24 +0200 |
commit | 4455e4da4c5efdc2c44614afdee7b9610f8dfbcb (patch) | |
tree | 349edde1eb6c7d7794d67d55bb12326ff5b20261 | |
parent | 4337493c9c3ec089d532daf2e160507167e224ed (diff) | |
download | abrt-4455e4da4c5efdc2c44614afdee7b9610f8dfbcb.tar.gz abrt-4455e4da4c5efdc2c44614afdee7b9610f8dfbcb.tar.xz abrt-4455e4da4c5efdc2c44614afdee7b9610f8dfbcb.zip |
PYHOOK: fixed exception re-throwing and deprecation warning (use hashlib instead of md5)
-rw-r--r-- | src/Hooks/abrt_exception_handler.py.in | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Hooks/abrt_exception_handler.py.in b/src/Hooks/abrt_exception_handler.py.in index cbf88c85..2b893e31 100644 --- a/src/Hooks/abrt_exception_handler.py.in +++ b/src/Hooks/abrt_exception_handler.py.in @@ -205,7 +205,7 @@ def handleMyException((etype, value, tb)): sys.excepthook = sys.__excepthook__ # pylint: disable-msg=E1101 import os.path - import md5 + from hashlib import md5 import traceback syslog.syslog("abrt: Pyhook: Detected unhandled exception in %s " % sys.argv[0]) @@ -222,7 +222,7 @@ def handleMyException((etype, value, tb)): ll[0] = os.path.basename(tblast[0]) tblast = ll - m = md5.new() + m = md5() ntext = "" for t in tblast: ntext += str(t) + ":" @@ -241,8 +241,8 @@ def handleMyException((etype, value, tb)): frame = trace.tb_frame text += ("\nLocal variables in innermost frame:\n") try: - for (key, value) in frame.f_locals.items(): - text += "%s: %s\n" % (key, value) + for (key, val) in frame.f_locals.items(): + text += "%s: %s\n" % (key, val) except: pass |