Skip to content
Snippets Groups Projects
Commit 8d460569 authored by Matt Mackall's avatar Matt Mackall
Browse files

dispatch: report failed imports nicely

parent e3afa670
No related branches found
No related tags found
No related merge requests found
...@@ -115,6 +115,14 @@ ...@@ -115,6 +115,14 @@
ui.warn(_(" empty string\n")) ui.warn(_(" empty string\n"))
else: else:
ui.warn("\n%r\n" % util.ellipsis(inst[1])) ui.warn("\n%r\n" % util.ellipsis(inst[1]))
except ImportError, inst:
m = str(inst).split()[-1]
ui.warn(_("abort: could not import module %s!\n" % m))
if m in "mpatch bdiff".split():
ui.warn(_("(did you forget to compile extensions?)\n"))
elif m in "zlib".split():
ui.warn(_("(is your Python install correct?)\n"))
except util.Abort, inst: except util.Abort, inst:
ui.warn(_("abort: %s\n") % inst) ui.warn(_("abort: %s\n") % inst)
except SystemExit, inst: except SystemExit, inst:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment