From 4adae650a399f504f78d9aef01860942172bb220 Mon Sep 17 00:00:00 2001 From: Thomas Mangin Date: Thu, 9 Apr 2020 15:00:18 +0100 Subject: util: T2205: do not display debuging when it is not set --- python/vyos/util.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'python/vyos/util.py') diff --git a/python/vyos/util.py b/python/vyos/util.py index c827425ee..a7dc235eb 100644 --- a/python/vyos/util.py +++ b/python/vyos/util.py @@ -24,12 +24,12 @@ def debug(flag): # - developer: the code will drop into PBD on un-handled exception # - ifconfig: prints command and sysfs access on stdout for interface if flag not in ['developer', 'ifconfig']: - return False + return '' return flag if os.path.isfile(f'/tmp/vyos.{flag}.debug') else '' def debug_msg(message, section=''): - if section: + if debug(section): print(f'DEBUG/{section:<6} {message}') -- cgit v1.2.3