From 275f896ed8af3a783853e1053ac9bc24de858c5a Mon Sep 17 00:00:00 2001 From: jesopo Date: Fri, 14 Feb 2020 22:03:53 +0000 Subject: move SpecTypeErro to utils.parse.spec --- src/core_modules/command_spec/__init__.py | 2 +- src/core_modules/command_spec/types.py | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) (limited to 'src/core_modules/command_spec') 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): -- cgit v1.3.1-10-gc9f91