diff options
| author | 2020-02-14 22:03:53 +0000 | |
|---|---|---|
| committer | 2020-02-14 22:03:53 +0000 | |
| commit | 275f896ed8af3a783853e1053ac9bc24de858c5a (patch) | |
| tree | 68f76947fcaf4502585db71583b6676c9e714a94 /src/core_modules | |
| parent | support exported command spec types! (diff) | |
| signature | ||
move SpecTypeErro to utils.parse.spec
Diffstat (limited to 'src/core_modules')
| -rw-r--r-- | src/core_modules/command_spec/__init__.py | 2 | ||||
| -rw-r--r-- | src/core_modules/command_spec/types.py | 6 |
2 files changed, 2 insertions, 6 deletions
diff --git a/src/core_modules/command_spec/__init__.py b/src/core_modules/command_spec/__init__.py index 1ac25499..85ef6571 100644 --- a/src/core_modules/command_spec/__init__.py +++ b/src/core_modules/command_spec/__init__.py @@ -53,7 +53,7 @@ class Module(ModuleManager.BaseModule): if func: try: value, n = func(server, channel, user, args) - except types.SpecTypeError as e: + except utils.parse.SpecTypeError as e: error = e.message options.append([argument_type, value, n, error]) diff --git a/src/core_modules/command_spec/types.py b/src/core_modules/command_spec/types.py index cb7c841e..c39128dd 100644 --- a/src/core_modules/command_spec/types.py +++ b/src/core_modules/command_spec/types.py @@ -1,8 +1,4 @@ - -class SpecTypeError(Exception): - def __init__(self, message: str, arg_count: int=1): - self.message = message - self.arg_count = arg_count +from src.utils.parse import SpecTypeError TYPES = {} def _type(func): |
