Commit fdb85e3d authored by Bernardo Dal Seno's avatar Bernardo Dal Seno
Browse files

cfgupgrade: Fix error messages

Messages were inconsistent. You could get both an error and a message
saying that everything was fine.
Signed-off-by: default avatarBernardo Dal Seno <>
Reviewed-by: default avatarHelga Velroyen <>
parent 09b7b6f2
# Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012 Google Inc.
# Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Google Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
......@@ -334,6 +334,7 @@ def main():
# test loading the config file
all_ok = True
if not (options.dry_run or options.no_verify):"Testing the new config file...")
cfg = config.ConfigWriter(cfg_file=options.CONFIG_DATA_PATH,
......@@ -345,11 +346,17 @@ def main():
logging.error("Errors after conversion:")
for item in vrfy:
logging.error(" - %s", item)
all_ok = False
else:"File loaded successfully after upgrading")
del cfg"File loaded successfully")
cli.ToStderr("Configuration successfully upgraded for version %s.",
if all_ok:
cli.ToStderr("Configuration successfully upgraded to version %s.",
cli.ToStderr("Configuration upgraded to version %s, but there are errors."
"\nPlease review the file.", constants.RELEASE_VERSION)
if __name__ == "__main__":
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment