mirror of
https://github.com/mashed-potatoes/PotatoNV-crossplatform.git
synced 2024-11-10 01:02:17 +01:00
ui: Print debug messages only if POTATONV_DEBUG is true
Change-Id: I9bdf20bf1ef599aba2a2250d3a33c2634aa534b0 Signed-off-by: Woomymy <woomy@woomy.be>
This commit is contained in:
parent
8c65273bed
commit
513462840a
1 changed files with 4 additions and 0 deletions
|
@ -1,5 +1,9 @@
|
|||
import chalk
|
||||
from os import environ
|
||||
|
||||
def debug(*data):
|
||||
if "POTATONV_DEBUG" in environ and bool(environ["POTATONV_DEBUG"]):
|
||||
print(chalk.yellow("debug"), " ".join(data))
|
||||
|
||||
def error(*data, critical=False):
|
||||
print(chalk.red("error"), " ".join(data))
|
||||
|
|
Loading…
Reference in a new issue