hook: use sys.exc_info rather than the deprecated equivalents
authorSiddharth Agarwal <sid0@fb.com>
Thu, 11 Feb 2016 22:02:52 -0800
changeset 28078 2058e1a894f2
parent 28077 27ae22a4f9f9
child 28079 0c9e914029be
hook: use sys.exc_info rather than the deprecated equivalents sys.exc_type etc have been deprecated since Python 1.5.
mercurial/hook.py
--- a/mercurial/hook.py	Thu Feb 11 23:15:34 2016 +0900
+++ b/mercurial/hook.py	Thu Feb 11 22:02:52 2016 -0800
@@ -50,12 +50,12 @@
             try:
                 obj = __import__(modname)
             except ImportError:
-                e1 = sys.exc_type, sys.exc_value, sys.exc_traceback
+                e1 = sys.exc_info()
                 try:
                     # extensions are loaded with hgext_ prefix
                     obj = __import__("hgext_%s" % modname)
                 except ImportError:
-                    e2 = sys.exc_type, sys.exc_value, sys.exc_traceback
+                    e2 = sys.exc_info()
                     if ui.tracebackflag:
                         ui.warn(_('exception from first failed import '
                                   'attempt:\n'))