diff options
Diffstat (limited to 'Lib/importlib/_bootstrap.py')
-rw-r--r-- | Lib/importlib/_bootstrap.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/importlib/_bootstrap.py b/Lib/importlib/_bootstrap.py index 857583a..70b706a 100644 --- a/Lib/importlib/_bootstrap.py +++ b/Lib/importlib/_bootstrap.py @@ -786,6 +786,8 @@ class FrozenImporter: """ + _ORIGIN = "frozen" + @staticmethod def module_repr(m): """Return repr for the module. @@ -793,12 +795,12 @@ class FrozenImporter: The method is deprecated. The import machinery does the job itself. """ - return '<module {!r} (frozen)>'.format(m.__name__) + return '<module {!r} ({})>'.format(m.__name__, FrozenImporter._ORIGIN) @classmethod def find_spec(cls, fullname, path=None, target=None): if _imp.is_frozen(fullname): - return spec_from_loader(fullname, cls, origin='frozen') + return spec_from_loader(fullname, cls, origin=cls._ORIGIN) else: return None |