diff options
author | Rob Austein <sra@hactrn.net> | 2016-04-28 01:25:09 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2016-04-28 01:25:09 +0000 |
commit | fe2f853e7bec8d6966b6f8ee59c177c4606a30da (patch) | |
tree | caa3806c01471b2bbfbe0ab2ae26b892c88aa82d /potpourri/ca-pickle.py | |
parent | bdc3a6ef48a3ebbd44b4f51d274a21b24aac8eb9 (diff) |
Pull ca-{pickle,unpickle}.py updates from trunk/.
svn path=/branches/tk705/; revision=6398
Diffstat (limited to 'potpourri/ca-pickle.py')
-rwxr-xr-x | potpourri/ca-pickle.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/potpourri/ca-pickle.py b/potpourri/ca-pickle.py index 92741853..2c63e978 100755 --- a/potpourri/ca-pickle.py +++ b/potpourri/ca-pickle.py @@ -55,15 +55,15 @@ for section in ("rpkid", "irdbd", "pubd"): databases[section] = tables filenames = [cfg.filename] -raw_config = {} -cooked_config = {} +raw_config = dict((section, {}) for section in cfg.cfg.sections()) +cooked_config = dict((section, {}) for section in cfg.cfg.sections()) for section in cfg.cfg.sections(): for option in cfg.cfg.options(section): - raw_config[section, option] = cfg.cfg.get(section = section, option = option) - cooked_config[section, option] = cfg.get(section = section, option = option) - if os.path.isfile(cooked_config[section, option]): - filenames.append(cooked_config[section, option]) + raw_config [section][option] = cfg.cfg.get(section = section, option = option) + cooked_config[section][option] = cfg.get(section = section, option = option) + if os.path.isfile( cooked_config[section][option]): + filenames.append(cooked_config[section][option]) for i, fn in enumerate(filenames): filenames[i] = os.path.abspath(fn) @@ -89,6 +89,7 @@ xz = subprocess.Popen( cPickle.dump(world, xz.stdin, args.protocol) +xz.stdin.flush() xz.stdin.close() if xz.wait() != 0: |