mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-10 16:48:31 +02:00
small code cleanup
This commit is contained in:
parent
789dd40597
commit
1ef9f1aa5d
2 changed files with 4 additions and 9 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue