From 959b6fe59ef06552f19f9b20bf85614bfe5c977e Mon Sep 17 00:00:00 2001 From: Apollon Oikonomopoulos <apollon@noc.grnet.gr> Date: Fri, 18 Mar 2011 16:38:40 +0200 Subject: [PATCH] cfgupgrade: really ignore hostname when told so cfgupgrade provides a --ignore-hostname option, however consequently it spawns config.ConfigWriter, which refuses to handle a foreign configuration file by default. config.ConfigWriter provides a relative keyword argument, accept_foreign, so we tie this to the value of options.ignore_hostname. Signed-off-by: Apollon Oikonomopoulos <apollon@noc.grnet.gr> Reviewed-by: Michael Hanselmann <hansmi@google.com> --- tools/cfgupgrade | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/cfgupgrade b/tools/cfgupgrade index 222292018..320f229ca 100755 --- a/tools/cfgupgrade +++ b/tools/cfgupgrade @@ -221,6 +221,7 @@ def main(): if not (options.dry_run or options.no_verify): logging.info("Testing the new config file...") cfg = config.ConfigWriter(cfg_file=options.CONFIG_DATA_PATH, + accept_foreign=options.ignore_hostname, offline=True) # if we reached this, it's all fine vrfy = cfg.VerifyConfig() -- GitLab