summaryrefslogtreecommitdiff
path: root/src/op_mode
diff options
context:
space:
mode:
Diffstat (limited to 'src/op_mode')
-rwxr-xr-xsrc/op_mode/firewall.py2
-rwxr-xr-xsrc/op_mode/otp.py2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/op_mode/firewall.py b/src/op_mode/firewall.py
index 23b4b8459..11cbd977d 100755
--- a/src/op_mode/firewall.py
+++ b/src/op_mode/firewall.py
@@ -300,6 +300,8 @@ def show_firewall_group(name=None):
for priority, priority_conf in firewall[item][name_type].items():
if priority not in firewall[item][name_type]:
continue
+ if 'rule' not in priority_conf:
+ continue
for rule_id, rule_conf in priority_conf['rule'].items():
source_group = dict_search_args(rule_conf, 'source', 'group', group_type)
dest_group = dict_search_args(rule_conf, 'destination', 'group', group_type)
diff --git a/src/op_mode/otp.py b/src/op_mode/otp.py
index c472a1ed3..6d4298894 100755
--- a/src/op_mode/otp.py
+++ b/src/op_mode/otp.py
@@ -23,7 +23,7 @@ from jinja2 import Template
from vyos.configquery import ConfigTreeQuery
from vyos.xml import defaults
from vyos.configdict import dict_merge
-from vyos.util import popen
+from vyos.utils.process import popen
users_otp_template = Template("""