Skip to content
This repository has been archived by the owner on Jan 16, 2019. It is now read-only.

Commit

Permalink
Merge pull request #208 from ubaumann/develop
Browse files Browse the repository at this point in the history
Add more generic check for error on config replace
  • Loading branch information
ktbyers authored Oct 6, 2017
2 parents 6e7c2e6 + 5baa342 commit 5137b2b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions napalm_ios/ios.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,9 +407,9 @@ def commit_config(self):
else:
cmd = 'configure replace {} force'.format(cfg_file)
output = self._commit_hostname_handler(cmd)
if ('Failed to apply command' in output) or \
('original configuration has been successfully restored' in output) or \
('Error' in output):
if ('original configuration has been successfully restored' in output) or \
('error' in output.lower()) or \
('failed' in output.lower()):
msg = "Candidate config could not be applied\n{}".format(output)
raise ReplaceConfigException(msg)
elif '%Please turn config archive on' in output:
Expand Down

0 comments on commit 5137b2b

Please sign in to comment.