aboutsummaryrefslogtreecommitdiff
path: root/src/utils/__init__.py
diff options
context:
space:
mode:
authorGravatar jesopo2019-10-04 10:25:48 +0100
committerGravatar jesopo2019-10-04 10:25:48 +0100
commit3466a3c43e50cf6fc55636352b82eab3f407c7f3 (patch)
tree581634fbe538e4e0772f7eaacb0be01811ea559d /src/utils/__init__.py
parentcheck that `third_words` isn't empty (diff)
signature
Allow utils.Setting_ parse functions to throw detailed errors
Diffstat (limited to 'src/utils/__init__.py')
-rw-r--r--src/utils/__init__.py3
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):