From 760aaccfff3d3ab711fdafa4adbd56bfdb63b8ef Mon Sep 17 00:00:00 2001 From: sherl Date: Sat, 18 Oct 2025 14:23:08 +0200 Subject: [PATCH] feat: add debug printing allows to print messages to stdout only if the instance has debugging enabled --- ythdd_globals.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ythdd_globals.py b/ythdd_globals.py index cb3eb15..198a03c 100644 --- a/ythdd_globals.py +++ b/ythdd_globals.py @@ -151,3 +151,7 @@ def getCommit() -> str | None: except Exception as e: return None +def print_debug(text: str) -> None: + # Will print a string only if debugging is enabled. + if config["general"]["debug"]: + print(text)