summaryrefslogtreecommitdiff
path: root/plugins/module_utils
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/module_utils')
-rw-r--r--plugins/module_utils/network/vyos/config/firewall_global/firewall_global.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/module_utils/network/vyos/config/firewall_global/firewall_global.py b/plugins/module_utils/network/vyos/config/firewall_global/firewall_global.py
index 16a91d4e..ddb4af80 100644
--- a/plugins/module_utils/network/vyos/config/firewall_global/firewall_global.py
+++ b/plugins/module_utils/network/vyos/config/firewall_global/firewall_global.py
@@ -368,7 +368,7 @@ class Firewall_global(ConfigBase):
)
elif not opr and key in l_set:
if key == "name" and self._is_grp_del(h, want, key):
- if commands[-1] == cmd + " " + want["name"] + " " + self._grp_type(
+ if len(commands) > 0 and commands[-1] == cmd + " " + want["name"] + " " + self._grp_type(
attr,
):
commands.pop()