Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_remove_all_separators() works when no separator exists #171

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bugfixes:
- "pfsense_interface - fixes removal of an interface with `state: absent`. _remove_all_separators() works when no separator exists for that interface. (https://github.com/pfsensible/core/issues/170)"
2 changes: 1 addition & 1 deletion plugins/module_utils/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ def _remove_all_rules(self, interface):
def _remove_all_separators(self, interface):
""" delete all interface separators """
todel = []
separators = self.pfsense.rules.find('separator')
separators = self.pfsense.rules.find('separator') or []
for interface_elt in separators:
if interface_elt.tag != interface:
continue
Expand Down
Loading