diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2016-08-15 12:31:46 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2016-08-15 12:37:39 +0200 |
commit | 0edf0c99959bab4d5f43eec315484d1e1581644a (patch) | |
tree | 5aba281d5a8de207897241701be0405f50c9465a | |
parent | 6c33a15e41f26022daefa1b1c16f2500f4b56e5f (diff) |
vty: Check the result of the write command
When running on top of vboxsf the write option doesn't work and we
have a success that should be a failure. Check the success string
we want to see on write.
Change-Id: I460e2da10f049807e4729f53fc69448c9c30f5f9
-rw-r--r-- | osmopy/osmotestconfig.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/osmopy/osmotestconfig.py b/osmopy/osmotestconfig.py index c601e82..8e5f253 100644 --- a/osmopy/osmotestconfig.py +++ b/osmopy/osmotestconfig.py @@ -94,7 +94,9 @@ def copy_config(dirname, config): def write_config(vty): new_config = vty.enabled_command("write") - print new_config.split(' ')[-1] + if not new_config.startswith("Configuration saved to "): + print(new_config) + return 1, [new_config] return 0 |