changeset 28078:2058e1a894f2

hook: use sys.exc_info rather than the deprecated equivalents sys.exc_type etc have been deprecated since Python 1.5.
author Siddharth Agarwal <sid0@fb.com>
date Thu, 11 Feb 2016 22:02:52 -0800
parents 27ae22a4f9f9
children 0c9e914029be
files mercurial/hook.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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'))