mercurial/extensions.py
changeset 31074 2912b06905dc
parent 30575 5ffbaba9acac
child 31263 d79761fe697f
equal deleted inserted replaced
31073:2cf1e5207fdf 31074:2912b06905dc
   360 
   360 
   361 def _disabledpaths(strip_init=False):
   361 def _disabledpaths(strip_init=False):
   362     '''find paths of disabled extensions. returns a dict of {name: path}
   362     '''find paths of disabled extensions. returns a dict of {name: path}
   363     removes /__init__.py from packages if strip_init is True'''
   363     removes /__init__.py from packages if strip_init is True'''
   364     import hgext
   364     import hgext
   365     extpath = os.path.dirname(os.path.abspath(hgext.__file__))
   365     extpath = os.path.dirname(
       
   366         os.path.abspath(pycompat.fsencode(hgext.__file__)))
   366     try: # might not be a filesystem path
   367     try: # might not be a filesystem path
   367         files = os.listdir(extpath)
   368         files = os.listdir(extpath)
   368     except OSError:
   369     except OSError:
   369         return {}
   370         return {}
   370 
   371