Skip to content

Conversation

@sc68cal
Copy link

@sc68cal sc68cal commented Sep 13, 2023

This fixes #286

@dlyssenko
Copy link
Contributor

Hi @sc68cal, here's the problem description:

The issue has been introduced with PR#220:

  • that PR introduced cached parsing of the running config, which is mostly indent-structured text
  • however, we entirely overlooked a banner section

Unlike the rest of the config, the banner section(s) is a free text (i.e. unstructured) and therefore may produce:

  • false positive results
  • failures (like in your case)
  • rogue / bogus / phony sections.

I have RC'ed your case - the failure occurs when a banner section contains a non-empty line containing only white spaces (in the rest of the config such lines are not allowed).

Your PR, indeed fixes that failure but does not solves the other issues, thus the code needs to be rewritten and UT fixture also needs to be updated respectively.

So, I'm going to close your PR and will file mine instead, where I take care of all the mentioned issues. The banner there will be parsed into a separate section.

Please test it as soon as I file it (later today / tomorrow). I'll update you.
thank you for catching this issue!

@dlyssenko
Copy link
Contributor

The fixing PR is #291

@dlyssenko dlyssenko closed this Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

IndexError: string index out of range

2 participants