aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2024-12-09 11:12:47 -0600
committerFrederick Muriuki Muriithi2024-12-09 11:19:03 -0600
commitfd0b5916ad9d9b231a1322dcc1766fafdd6741a7 (patch)
tree5793a7f3317a0e5ea6b741db576fe679fadb8250
parentf9caab321d56342a5cc330611ed18c38c643ed28 (diff)
downloadgn-libs-fd0b5916ad9d9b231a1322dcc1766fafdd6741a7.tar.gz
Add an Exception for invalid option values.
-rw-r--r--gn_libs/mysqldb.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/gn_libs/mysqldb.py b/gn_libs/mysqldb.py
index be21550..6c05a6b 100644
--- a/gn_libs/mysqldb.py
+++ b/gn_libs/mysqldb.py
@@ -11,6 +11,9 @@ from MySQLdb.cursors import Cursor
_logger = logging.getLogger(__file__)
+class InvalidOptionValue(Exception):
+ """Raised whenever a parsed value is invalid for the specific option."""
+
def __check_true__(val: str) -> bool:
"""Check whether the variable 'val' has the string value `true`."""