##// END OF EJS Templates
extensions: make `hg nonexistent` not crash with PyOxidizer...
Martin von Zweigbergk -
r45665:5d09a120 default
parent child Browse files
Show More
@@ -706,12 +706,17 b' def _disabledpaths():'
706 '''find paths of disabled extensions. returns a dict of {name: path}'''
706 '''find paths of disabled extensions. returns a dict of {name: path}'''
707 import hgext
707 import hgext
708
708
709 extpath = os.path.dirname(
709 # The hgext might not have a __file__ attribute (e.g. in PyOxidizer) and
710 os.path.abspath(pycompat.fsencode(hgext.__file__))
710 # it might not be on a filesystem even if it does.
711 )
711 if util.safehasattr(hgext, '__file__'):
712 try: # might not be a filesystem path
712 extpath = os.path.dirname(
713 files = os.listdir(extpath)
713 os.path.abspath(pycompat.fsencode(hgext.__file__))
714 except OSError:
714 )
715 try:
716 files = os.listdir(extpath)
717 except OSError:
718 return {}
719 else:
715 return {}
720 return {}
716
721
717 exts = {}
722 exts = {}
General Comments 0
You need to be logged in to leave comments. Login now