small code cleanup

This commit is contained in:
Jonathan Wren 2020-07-02 20:39:16 -07:00
parent 66e23d1444
commit 526867bcdd
2 changed files with 4 additions and 9 deletions

View file

@ -140,11 +140,6 @@ Python 3.7 (or higher) soon.
manual_args = sys.argv[1:]
args = parse_args_before_config(manual_args)
# import pprint
# pp = pprint.PrettyPrinter(depth=4)
# pp.pprint(args)
configure_logger(args.debug)
# Run command if possible before config is available

View file

@ -141,14 +141,14 @@ def scope_config(config, journal_name):
return config
config = config.copy()
journal_conf = config["journals"].get(journal_name)
if (
type(journal_conf) is dict
): # We can override the default config on a by-journal basis
if type(journal_conf) is dict:
# We can override the default config on a by-journal basis
log.debug(
"Updating configuration with specific journal overrides %s", journal_conf
)
config.update(journal_conf)
else: # But also just give them a string to point to the journal file
else:
# But also just give them a string to point to the journal file
config["journal"] = journal_conf
config.pop("journals")
return config