diff --git a/routerbackup b/routerbackup index e1d40b9..4ba5a7a 100755 --- a/routerbackup +++ b/routerbackup @@ -369,6 +369,11 @@ class AsaConfig(ConfigWithShell): self._shell_command(channel, 'term pager 0', waitfor='#\s*$', waitmax=1) shrun = self._shell_command(channel, 'sh run', waitfor=': end') + # strip late previous lines and command echo + for i in range(0, 5): + if re.search('^\s*: Saved\s*$', shrun[i]): + del shrun[0:i] + iproute = [] for cmd in ('sh ip address', 'sh route'): iproute.append('# '+ cmd.center(76, '='))