Mercurial > hg-stable
changeset 15199:56da00994067
extensions: print some debug info on import failure
This is handy if hgext.foo exists but has a bogus "import blah":
previously we just discarded the "No module named blah" error. Now at
least you can see it with --debug. Not perfect, but better than
nothing.
author | Greg Ward <greg@gerg.ca> |
---|---|
date | Sat, 01 Oct 2011 16:42:39 -0400 |
parents | 62dc0e7ab092 |
children | 797bf1dc1ff8 |
files | mercurial/extensions.py |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/extensions.py Sun Oct 02 14:34:28 2011 -0400 +++ b/mercurial/extensions.py Sat Oct 01 16:42:39 2011 -0400 @@ -69,7 +69,9 @@ return mod try: mod = importh("hgext.%s" % name) - except ImportError: + except ImportError, err: + ui.debug('could not import hgext.%s (%s): trying %s\n' + % (name, err, name)) mod = importh(name) _extensions[shortname] = mod _order.append(shortname)