f
This commit is contained in:
14
CLI.py
14
CLI.py
@@ -28,20 +28,6 @@ if not os.environ.get("MM_DEBUG"):
|
||||
val = str(row[0]).strip().lower()
|
||||
if val in ("1", "true", "yes", "on"):
|
||||
os.environ["MM_DEBUG"] = "1"
|
||||
|
||||
# Fallback to legacy config.conf if not set by DB
|
||||
if not os.environ.get("MM_DEBUG"):
|
||||
conf_path = Path(__file__).resolve().parent / "config.conf"
|
||||
if conf_path.exists():
|
||||
for ln in conf_path.read_text(encoding="utf-8").splitlines():
|
||||
ln_strip = ln.strip()
|
||||
if ln_strip.startswith("debug"):
|
||||
parts = ln_strip.split("=", 1)
|
||||
if len(parts) >= 2:
|
||||
val = parts[1].strip().strip('"').strip("'").strip().lower()
|
||||
if val in ("1", "true", "yes", "on"):
|
||||
os.environ["MM_DEBUG"] = "1"
|
||||
break
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
|
||||
Reference in New Issue
Block a user