diff options
author | Thomas Mangin <thomas.mangin@exa.net.uk> | 2020-04-09 15:00:18 +0100 |
---|---|---|
committer | Thomas Mangin <thomas.mangin@exa.net.uk> | 2020-04-09 15:01:09 +0100 |
commit | 4adae650a399f504f78d9aef01860942172bb220 (patch) | |
tree | 7348e277378d536da84d9263f317b30d2123c5fc /python/vyos/util.py | |
parent | 4254a170a397e0605a471d81a14d65e510e24811 (diff) | |
download | vyos-1x-4adae650a399f504f78d9aef01860942172bb220.tar.gz vyos-1x-4adae650a399f504f78d9aef01860942172bb220.zip |
util: T2205: do not display debuging when it is not set
Diffstat (limited to 'python/vyos/util.py')
-rw-r--r-- | python/vyos/util.py | 4 |
1 files changed, 2 insertions, 2 deletions
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}') |