Skip to content

Commit fc1ad78

Browse files
committed
fix(loader): Fix #130, FileFinder remove to handle default suffix (.py, .pyc, ..)
[why] PyeLoader import av module will got exception [how] Doesn't need to handle default module behavior in PyeLoader, skip it
1 parent 0ee898e commit fc1ad78

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/pyconcrete/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@ def get_source(self, fullname):
103103

104104

105105
def install():
106-
loader_details = [(PyeLoader, SOURCE_SUFFIXES)] + _get_supported_file_loaders()
106+
# only put pyconcrete ext/suffix(.pye) for loader, leave default suffixes(SOURCE_SUFFIXES) to default loader
107+
loader_details = [(PyeLoader, [get_ext()])] + _get_supported_file_loaders()
107108

108109
sys.path_importer_cache.clear()
109110
sys.path_hooks.insert(0, FileFinder.path_hook(*loader_details))

0 commit comments

Comments
 (0)