Show More
@@ -706,13 +706,18 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 | # The hgext might not have a __file__ attribute (e.g. in PyOxidizer) and | |||
|
710 | # it might not be on a filesystem even if it does. | |||
|
711 | if util.safehasattr(hgext, '__file__'): | |||
709 | extpath = os.path.dirname( |
|
712 | extpath = os.path.dirname( | |
710 | os.path.abspath(pycompat.fsencode(hgext.__file__)) |
|
713 | os.path.abspath(pycompat.fsencode(hgext.__file__)) | |
711 | ) |
|
714 | ) | |
712 | try: # might not be a filesystem path |
|
715 | try: | |
713 | files = os.listdir(extpath) |
|
716 | files = os.listdir(extpath) | |
714 | except OSError: |
|
717 | except OSError: | |
715 | return {} |
|
718 | return {} | |
|
719 | else: | |||
|
720 | return {} | |||
716 |
|
721 | |||
717 | exts = {} |
|
722 | exts = {} | |
718 | for e in files: |
|
723 | for e in files: |
General Comments 0
You need to be logged in to leave comments.
Login now