From fd0b5916ad9d9b231a1322dcc1766fafdd6741a7 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Mon, 9 Dec 2024 11:12:47 -0600 Subject: Add an Exception for invalid option values. --- gn_libs/mysqldb.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gn_libs') 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`.""" -- cgit v1.2.3