hook: use sys.exc_info rather than the deprecated equivalents
sys.exc_type etc have been deprecated since Python 1.5.
--- 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'))