summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2019-06-20 22:14:36 +0200
committerChristian Poessinger <christian@poessinger.com>2019-06-20 22:14:36 +0200
commitefb1a1c88f436a3704c4ca6e15b65aeded4b9654 (patch)
tree632cf5e7cce0a31b7f74b30f59d2080b787fdd26 /src
parent06e6ae3bac7cd39341c0b19b570020649d725344 (diff)
downloadvyos-1x-efb1a1c88f436a3704c4ca6e15b65aeded4b9654.tar.gz
vyos-1x-efb1a1c88f436a3704c4ca6e15b65aeded4b9654.zip
firewall: T1461: deleting 'firewall options' causes Python TypeError
[ firewall options interface wg01 ] Traceback (most recent call last): File "/usr/libexec/vyos/conf_mode/firewall_options.py", line 139, in <module> apply(c) File "/usr/libexec/vyos/conf_mode/firewall_options.py", line 97, in apply if tcp['new_chain4']: TypeError: 'NoneType' object is not subscriptable delete [ firewall options ] failed delete [ firewall ] failed Commit failed
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/firewall_options.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/conf_mode/firewall_options.py b/src/conf_mode/firewall_options.py
index e2c306904..2be80cdbf 100755
--- a/src/conf_mode/firewall_options.py
+++ b/src/conf_mode/firewall_options.py
@@ -32,7 +32,8 @@ def get_config():
opts = copy.deepcopy(default_config_data)
conf = Config()
if not conf.exists('firewall options'):
- return None
+ # bail out early
+ return opts
else:
conf.set_level('firewall options')