diff options
author | Christian Poessinger <christian@poessinger.com> | 2020-04-09 07:38:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-09 07:38:01 +0200 |
commit | d4469e373df1ee5f572cd601cb0aa7fd1bdd7770 (patch) | |
tree | 1548930a6cc31561d54fe5f6366a03e3692d4793 /python/vyos/util.py | |
parent | ec99423f227fcb879ff9abeca2c49c5b86804044 (diff) | |
parent | 38c2b8947e5e901609a834e0c6c14ed7f17043f2 (diff) | |
download | vyos-1x-d4469e373df1ee5f572cd601cb0aa7fd1bdd7770.tar.gz vyos-1x-d4469e373df1ee5f572cd601cb0aa7fd1bdd7770.zip |
Merge pull request #314 from thomas-mangin/T2186
airbag: T2186: report friendly user message and log to syslog
Diffstat (limited to 'python/vyos/util.py')
-rw-r--r-- | python/vyos/util.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/python/vyos/util.py b/python/vyos/util.py index 385dc73df..c827425ee 100644 --- a/python/vyos/util.py +++ b/python/vyos/util.py @@ -19,6 +19,12 @@ import sys from subprocess import Popen, PIPE, STDOUT, DEVNULL def debug(flag): + # this is to force all new flags to be registered here so that + # they can be documented: + # - 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 flag if os.path.isfile(f'/tmp/vyos.{flag}.debug') else '' |