8000 Print stacktrace for ErrorLoadingNamespace by mpcusack-color · Pull Request #41 · color/clr · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Mar 31, 2025. It is now read-only.

Print stacktrace for ErrorLoadingNamespace #41

Merged
merged 1 commit into from
Nov 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion clr/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.3.18"
__version__ = "0.3.19"
5 changes: 5 additions & 0 deletions clr/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@ def resolve_command(query, cache=None):
sys.exit(1)

namespace = cache.get(namespace_key) if cache else get_namespace(namespace_key)
if isinstance(namespace, ErrorLoadingNamespace):
print(f'Error loading {namespace_key} namespace module.\n')
print(namespace.longdescr)
sys.exit(1)

if command_name not in namespace.commands:
print(
f"Error! Command '{command_name}' does not exist in namespace '{namespace_key}' - "
Expand Down
0