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

Cisco IOS Banner issue when run CiscoConfParse #5

Closed
codechang opened this issue Apr 15, 2014 · 2 comments
Closed

Cisco IOS Banner issue when run CiscoConfParse #5

codechang opened this issue Apr 15, 2014 · 2 comments
Labels

Comments

@codechang
Copy link

when running CiscoConfParse for IOS configuration which included banner settings. The CiscoConfParse will show error. Attached testing config and error output. Thank you!

=== Python 2.7.5 ===
from ciscoconfparse import CiscoConfParse

p = CiscoConfParse("config.txt")

=== Tested config ===
!
spanning-tree mode pvst
spanning-tree extend system-id
no spanning-tree vlan 450-451
!
!
banner motd ^CCCC


** ** UNAUTHORIZED ACCESS PROHIBITED ** **


** ** UNAUTHORIZED USE PROHIBITED ** **




^C
!
!
end

======= Error =======
Traceback (most recent call last):
File "C:/My Projects/test1/t1.py", line 4, in
p = CiscoConfParse("config.txt")
File "C:\Python27\lib\site-packages\ciscoconfparse\ciscoconfparse.py", line 125, in init
ignore_blank_lines=ignore_blank_lines)
File "C:\Python27\lib\site-packages\ciscoconfparse\ciscoconfparse.py", line 1278, in init
self._bootstrap_obj_init(data)
File "C:\Python27\lib\site-packages\ciscoconfparse\ciscoconfparse.py", line 1419, in _bootstrap_obj_init
self.maintain_obj_sanity()
File "C:\Python27\lib\site-packages\ciscoconfparse\ciscoconfparse.py", line 1432, in maintain_obj_sanity
self._mark_banner("motd", "ios")
File "C:\Python27\lib\site-packages\ciscoconfparse\ciscoconfparse.py", line 1547, in _mark_banner
if (DBGFLAG is True):
NameError: global name 'DBGFLAG' is not defined
Process finished with exit code 1

@mpenning
Copy link
Owner

Thank you very much for reporting this bug. Version 0.9.25 does not have this problem; so you could downgrade with pip install ciscoconfparse==0.9.25. I will try to fix this problem ASAP when I get home from work.

mpenning added a commit that referenced this issue Apr 16, 2014
--HG--
branch : ciscoconfparse
@mpenning
Copy link
Owner

This should be fixed in ciscoconfparse version 0.9.31. Thank you for reporting this problem.

@mpenning mpenning added the bug label Jul 25, 2014
mpenning added a commit that referenced this issue Jan 18, 2015
--HG--
branch : ciscoconfparse
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants