GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||
GeezerVison is showing github.com — Fix find_children_w_parents to include only real descendants by kat-git-hub · Pull Request #900 · networktocode/netutils Conversation
Contributor
Fixes #836 find_children_w_parents grouped lines by their top level parent instead of the actual matched line. So matching one child pulled in every sibling under the same parent, even ones that don't match the pattern at all. Example from the issue: parsed.find_children_w_parents(parent_pattern="context local", child_pattern=" logging", match_type="regex") Before it also returned "something not logging". Now only the two logging lines come back. Also updated the existing ios_full_received.txt fixture. It expected contact-email-addr to be included alongside profile "CiscoTAC-1", but contact-email-addr doesn't match the test's child_pattern at all, it's just a sibling under call-home. Same bug, just baked into the expected test output. Added a separate flat_siblings test case for the exact issue scenario.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
kat-git-hub
requested review from
itdependsnetworks and
jeffkala
as code owners
Collaborator
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
|
There was an error while loading. Please reload this page.
|
@jeffkala Sorry, I hadn't seen #837 before opening this PR. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Bug: BaseSpaceConfigParser.find_children_w_parents()
There was an error while loading. Please reload this page.