summaryrefslogtreecommitdiff
path: root/src/conf_mode
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:16:46 +0200
commit6912d0c9ffcc6c81b0764a373dcc7f99093c5d3b (patch)
tree29d73f4dac4f1421b670e23f507e2fd67b6c1ac7 /src/conf_mode
parenteb3d3b6513cf027bd12b999cf9c892cfd5af486b (diff)
downloadvyos-1x-6912d0c9ffcc6c81b0764a373dcc7f99093c5d3b.tar.gz
vyos-1x-6912d0c9ffcc6c81b0764a373dcc7f99093c5d3b.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 (cherry picked from commit efb1a1c88f436a3704c4ca6e15b65aeded4b9654)
Diffstat (limited to 'src/conf_mode')
-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')