diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2013-11-08 11:16:39 -0500 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2013-11-08 11:17:05 -0500 |
commit | dc696de30352cd9b2f08d25c14eec62764879475 (patch) | |
tree | 4b74764f69a8a3d6569783b625016e7a60d43632 /tools/upgrade/1.3/migrate_configs.py | |
parent | 4ec5374f85c3870af06b38761f52bd08ef62d756 (diff) | |
download | bcfg2-dc696de30352cd9b2f08d25c14eec62764879475.tar.gz bcfg2-dc696de30352cd9b2f08d25c14eec62764879475.tar.bz2 bcfg2-dc696de30352cd9b2f08d25c14eec62764879475.zip |
tools: fix incorrect reference to config file in migrate_configs.py (from Matt Baker)
Diffstat (limited to 'tools/upgrade/1.3/migrate_configs.py')
-rwxr-xr-x | tools/upgrade/1.3/migrate_configs.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/upgrade/1.3/migrate_configs.py b/tools/upgrade/1.3/migrate_configs.py index b7adb2528..76b2392e7 100755 --- a/tools/upgrade/1.3/migrate_configs.py +++ b/tools/upgrade/1.3/migrate_configs.py @@ -16,13 +16,13 @@ def copy_section(src_file, tgt_cfg, section, newsection=None): tgt_cfg.add_section(newsection) except ConfigParser.DuplicateSectionError: print("[%s] section already exists in %s, adding options" % - (newsection, setup['cfile'])) + (newsection, setup['configfile'])) for opt in cfg.options(section): val = cfg.get(section, opt) if tgt_cfg.has_option(newsection, opt): print("%s in [%s] already populated in %s, skipping" % - (opt, newsection, setup['cfile'])) - print(" %s: %s" % (setup['cfile'], + (opt, newsection, setup['configfile'])) + print(" %s: %s" % (setup['configfile'], tgt_cfg.get(newsection, opt))) print(" %s: %s" % (src_file, val)) else: @@ -43,7 +43,7 @@ def main(): if os.path.exists(rules_conf): remove.append(rules_conf) copy_section(rules_conf, setup.cfp, "rules") - + # move packages config out of packages.conf and into bcfg2.conf pkgs_conf = os.path.join(setup['repo'], 'Packages', 'packages.conf') if os.path.exists(pkgs_conf): |