extensions: fix lookup of hgext.foo modules
authorMatt Mackall <mpm@selenic.com>
Wed, 13 Jun 2007 13:15:53 -0500
changeset 4560 3daed3680554
parent 4559 eda59019dc69
child 4582 7de7a80e7422
extensions: fix lookup of hgext.foo modules
mercurial/extensions.py
--- a/mercurial/extensions.py	Wed Jun 13 13:15:51 2007 -0500
+++ b/mercurial/extensions.py	Wed Jun 13 13:15:53 2007 -0500
@@ -16,8 +16,8 @@
         return _extensions[name]
     except KeyError:
         for k, v in _extensions.iteritems():
-            if k.endswith('.' + name) or k.endswith('/' + name) or v == name:
-                return sys.modules[v]
+            if k.endswith('.' + name) or k.endswith('/' + name):
+                return v
         raise KeyError(name)
 
 def load(ui, name, path):