changeset 4560:3daed3680554

extensions: fix lookup of hgext.foo modules
author Matt Mackall <mpm@selenic.com>
date Wed, 13 Jun 2007 13:15:53 -0500
parents eda59019dc69
children 7de7a80e7422
files mercurial/extensions.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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):