# HG changeset patch # User Matt Mackall # Date 2007-06-13 18:15:53 # Node ID 3daed3680554787f32bdc4cac7c034ad6129692d # Parent eda59019dc69e3f534799c3b11018d2eea015bea extensions: fix lookup of hgext.foo modules diff --git a/mercurial/extensions.py b/mercurial/extensions.py --- a/mercurial/extensions.py +++ b/mercurial/extensions.py @@ -16,8 +16,8 @@ def find(name): 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):