Skip to content

Commit

Permalink
update extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
DSaurus committed Dec 15, 2023
1 parent 3597b55 commit 5d21501
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def load_custom_modules():
and os.path.splitext(module_path)[1] != ".py"
):
continue
if module_path.endswith(".disabled"):
if module_path.endswith("_disabled"):
continue
time_before = time.perf_counter()
success = load_custom_module(module_path)
Expand Down
7 changes: 6 additions & 1 deletion threestudio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@

def register(name):
def decorator(cls):
__modules__[name] = cls
if name in __modules__:
raise ValueError(
f"Module {name} already exists! Names of extensions conflict!"
)
else:
__modules__[name] = cls
return cls

return decorator
Expand Down

0 comments on commit 5d21501

Please sign in to comment.