small core configuration cleanup

This commit is contained in:
Blake Harnden 2019-09-30 11:51:40 -07:00
parent 6b43c00031
commit 3f1ff113ca
2 changed files with 7 additions and 15 deletions

View file

@ -132,9 +132,9 @@ def get_merged_config(filename):
if not cfg.has_section(section):
cfg.add_section(section)
# merge command line with config file
for opt in args.__dict__:
val = args.__dict__[opt]
# merge argparse with configparser
for opt in vars(args):
val = getattr(args, opt)
if val is not None:
cfg.set(section, opt, str(val))