equal
deleted
inserted
replaced
62 ui.traceback(e1) |
62 ui.traceback(e1) |
63 if ui.tracebackflag: |
63 if ui.tracebackflag: |
64 ui.warn(_('exception from second failed import ' |
64 ui.warn(_('exception from second failed import ' |
65 'attempt:\n')) |
65 'attempt:\n')) |
66 ui.traceback(e2) |
66 ui.traceback(e2) |
|
67 |
|
68 if not ui.tracebackflag: |
|
69 tracebackhint = _( |
|
70 'run with --traceback for stack trace') |
|
71 else: |
|
72 tracebackhint = None |
67 raise error.HookLoadError( |
73 raise error.HookLoadError( |
68 _('%s hook is invalid: import of "%s" failed') % |
74 _('%s hook is invalid: import of "%s" failed') % |
69 (hname, modname)) |
75 (hname, modname), hint=tracebackhint) |
70 sys.path = oldpaths |
76 sys.path = oldpaths |
71 try: |
77 try: |
72 for p in funcname.split('.')[1:]: |
78 for p in funcname.split('.')[1:]: |
73 obj = getattr(obj, p) |
79 obj = getattr(obj, p) |
74 except AttributeError: |
80 except AttributeError: |