ciscoconfparse
ciscoconfparse copied to clipboard
Fix functionality of delete_children_matching
Fixes two issues with delete_children_matching as reported on #241 that I just ran into myself as well. Casts the resulting iterable from filter into a list. Since it's consumed by both the list comprehension for retval
, it was already exhausted when arriving at the map
. Also uses to deque to consume the map
iterable, as it's not executed until the items are iterated over. (I think this behavior changed somewhere in 3.x, it used to return a list) Could also just cast to a list of refactor to a for loop here, but I think deque
is the fastest way to consume it.
Sure, can do. Wasn't sure if the filter\map were there for legacy reasons. I can clean up the methodcaller
import in this PR as well if you want, looks like this was the last place it's accessed in here.
Wasn't sure if the filter\map were there for legacy reasons. I can clean up the methodcaller import in this PR as well if you want, looks like this was the last place it's accessed in here.
Please feel free to rip methodcaller
out of ccp_abc.py
. Thank you...
This PR has automatically been marked stale due to inactivity. It will automatically close unless further action is taken. Please understand that the CiscoConfParse team is not obligated to comment on (or approve) every Pull Request. For more detailed information, please refer to CONTRIBUTING guidance -> https://github.com/mpenning/ciscoconfparse/blob/main/.github/CONTRIBUTING.md