We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f2d066f commit a9fab94Copy full SHA for a9fab94
src/beaker_bunsen/corpus/loaders/code_library_loader.py
@@ -89,7 +89,7 @@ def discover(
89
while modules_to_collect:
90
module_spec = modules_to_collect.popleft()
91
92
- if not module_spec.origin.endswith('.py'):
+ if not module_spec.origin or not module_spec.origin.endswith('.py'):
93
logger.info(f"Skipping importing non-python file {module_spec.origin}")
94
continue
95
src/beaker_bunsen/corpus/loaders/schemes.py
@@ -163,6 +163,9 @@ def get_module_path(mod_name) -> str | None:
163
164
file_path = spec.origin
165
166
+ if file_path is None:
167
+ return None
168
+
169
if os.path.isfile(file_path):
170
if tail:
171
file_path = os.path.split(file_path)[0]
0 commit comments