Skip to content

Commit

Permalink
DEBUG_ENABLED: use strtobool
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiasdiener authored and inducer committed Oct 18, 2024
1 parent 08ca5d9 commit 250498a
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions pytato/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,15 @@
"""

# {{{ debug control

import os

from numpy import dtype

from pytools import strtobool

try:
v = os.environ.get("PYTATO_DEBUG")
if v is None:
v = ""

DEBUG_ENABLED = bool(eval(v))
except Exception:
DEBUG_ENABLED = False
DEBUG_ENABLED = strtobool(os.environ.get("PYTATO_DEBUG", "no"))


def set_debug_enabled(flag: bool) -> None:
Expand Down

0 comments on commit 250498a

Please sign in to comment.