Skip to content

Commit 313bc2b

Browse files
committed
fix: handle ValueError in is_debug_mode function
1 parent 4baf682 commit 313bc2b

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/potato_util/_base.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,11 @@ def is_debug_mode() -> bool:
8888

8989
_is_debug = False
9090
_debug = os.getenv("DEBUG", "").strip().lower()
91-
if _debug and is_truthy(_debug):
92-
_is_debug = True
91+
try:
92+
if _debug and is_truthy(_debug):
93+
_is_debug = True
94+
except ValueError:
95+
pass
9396

9497
_env = os.getenv("ENV", "").strip().lower()
9598
if (_env == "development") and (_debug == ""):

0 commit comments

Comments
 (0)