Skip to content

Commit 5d21501

Browse files
committed
update extensions
1 parent 3597b55 commit 5d21501

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

launch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def load_custom_modules():
8282
and os.path.splitext(module_path)[1] != ".py"
8383
):
8484
continue
85-
if module_path.endswith(".disabled"):
85+
if module_path.endswith("_disabled"):
8686
continue
8787
time_before = time.perf_counter()
8888
success = load_custom_module(module_path)

threestudio/__init__.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@
33

44
def register(name):
55
def decorator(cls):
6-
__modules__[name] = cls
6+
if name in __modules__:
7+
raise ValueError(
8+
f"Module {name} already exists! Names of extensions conflict!"
9+
)
10+
else:
11+
__modules__[name] = cls
712
return cls
813

914
return decorator

0 commit comments

Comments
 (0)