Skip to content

Commit 34ca246

Browse files
committed
fixed: ignore invalid modules while scanning
1 parent 822f3f7 commit 34ca246

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pymodules.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def requirements_file(module): return os.path.join(modules.module_directory, mod
1212

1313
def scan_for_modules():
1414
""" Returns a list of names for all modules found in the module folder """
15-
return [md.name for md in os.scandir(modules.module_directory) if md.is_dir()]
15+
return [md.name for md in os.scandir(modules.module_directory) if md.is_dir() and os.path.isfile(os.path.join(md.path, "package.json"))]
1616

1717
def check_for_new_modules():
1818
""" Returns a list of modules not previously configured """

0 commit comments

Comments
 (0)