diff --git a/mercurial/extensions.py b/mercurial/extensions.py --- a/mercurial/extensions.py +++ b/mercurial/extensions.py @@ -706,6 +706,10 @@ '''find paths of disabled extensions. returns a dict of {name: path}''' import hgext + # __file__ not always present. + if not util.safehasattr(hgext, "__file__"): + return {} + extpath = os.path.dirname( os.path.abspath(pycompat.fsencode(hgext.__file__)) )