strip garbage after ': end' line
This commit is contained in:
parent
a22fe6f1e4
commit
83d4c0e6a4
@ -374,6 +374,10 @@ class AsaConfig(ConfigWithShell):
|
||||
for i in range(0, 5):
|
||||
if re.search('^\s*: Saved\s*$', shrun[i]):
|
||||
del shrun[0:i]
|
||||
# strip garbage after ': end' line
|
||||
for i in range(-2, -6, -1): # -2! (-1 would delete all if : end is on last line)
|
||||
if re.search('^\s*: end\s*$', shrun[i]):
|
||||
del shrun[i+1:]
|
||||
|
||||
iproute = []
|
||||
for cmd in ('sh ip address', 'sh route'):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user