summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-04-09 20:07:24 +0200
committerGitHub <noreply@github.com>2020-04-09 20:07:24 +0200
commitc8a86d3ccee63b972c36346e6cb1c712c6801ad2 (patch)
tree7348e277378d536da84d9263f317b30d2123c5fc
parent4254a170a397e0605a471d81a14d65e510e24811 (diff)
parent4adae650a399f504f78d9aef01860942172bb220 (diff)
downloadvyos-1x-c8a86d3ccee63b972c36346e6cb1c712c6801ad2.tar.gz
vyos-1x-c8a86d3ccee63b972c36346e6cb1c712c6801ad2.zip
Merge pull request #319 from thomas-mangin/T2205
util: T2205: do not display debuging when it is not set
-rw-r--r--python/vyos/util.py4
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}')