diff options
| author | 2019-10-04 10:25:48 +0100 | |
|---|---|---|
| committer | 2019-10-04 10:25:48 +0100 | |
| commit | 3466a3c43e50cf6fc55636352b82eab3f407c7f3 (patch) | |
| tree | 581634fbe538e4e0772f7eaacb0be01811ea559d /src | |
| parent | check that `third_words` isn't empty (diff) | |
| signature | ||
Allow utils.Setting_ parse functions to throw detailed errors
Diffstat (limited to 'src')
| -rw-r--r-- | src/utils/__init__.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/utils/__init__.py b/src/utils/__init__.py index 36157204..e9e7bee5 100644 --- a/src/utils/__init__.py +++ b/src/utils/__init__.py @@ -264,6 +264,9 @@ def is_ip(s: str) -> bool: def is_main_thread() -> bool: return threading.current_thread() is threading.main_thread() +class SettingParseException(Exception): + pass + class Setting(object): example: typing.Optional[str] = None def __init__(self, name: str, help: str=None, example: str=None): |
