[MIG] session_redis: Migration to 18.0

This commit is contained in:
Patrick Tombez
2025-02-04 14:24:51 +01:00
parent 5fe59ffae3
commit 27879b5f79
4 changed files with 31 additions and 30 deletions
+6 -4
View File
@@ -15,7 +15,9 @@ _MAP = {
def strtobool(value):
try:
return _MAP[str(value).lower()]
except KeyError as error:
raise ValueError(f'"{value}" is not a valid bool value') from error
result = _MAP.get(str(value).strip().lower())
if result is None:
raise ValueError(f"Invalid boolean value: {repr(value)}")
return result