Skip to content

Commit 15f88ec

Browse files
committed
Fix install bugs
Signed-off-by: Alireza Poodineh <[email protected]>
1 parent 3b13a7d commit 15f88ec

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

build/modules/bite.unittest/module.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"id": "bite.unitest",
2+
"id": "bite.unittest",
33
"name": "Unit Test Template",
44
"version": "1.0.0",
55
"description": "Optimize projects for unit testing",

tools/pybite/module.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ def _get_modules(path: str) -> None:
116116
if d == '__pycache__':
117117
continue
118118
module_path = os.path.join(root, d)
119-
if 'module.json' in files:
119+
mj = os.path.join(module_path, 'module.json')
120+
if os.path.exists(mj):
120121
module = Module(module_path, require_json=False)
121122
if module.valid and not module.private:
122123
modules.append(module)
@@ -131,7 +132,7 @@ def _get_modules(path: str) -> None:
131132

132133
for module in modules:
133134
module_path = os.path.join(modules_dir, module.id)
134-
if os.listdir(module_path):
135+
if os.path.isdir(module_path):
135136
if not upgrade:
136137
print(f"Module {module.id} already exists.")
137138
continue

0 commit comments

Comments
 (0)