diff --git a/jrnl/install.py b/jrnl/install.py index d09e5150..0ff6159b 100644 --- a/jrnl/install.py +++ b/jrnl/install.py @@ -1,7 +1,8 @@ #!/usr/bin/env python # encoding: utf-8 -import readline, glob +import readline +import glob import getpass try: import simplejson as json except ImportError: import json @@ -25,7 +26,6 @@ default_config = { }, 'editor': "", 'encrypt': False, - 'password': "", 'default_hour': 9, 'default_minute': 0, 'timeformat': "%Y-%m-%d %H:%M", @@ -35,7 +35,7 @@ default_config = { } -def update_config(config, config_path=os.path.expanduser("~/.jrnl_conf")): +def upgrade_config(config, config_path=os.path.expanduser("~/.jrnl_conf")): """Checks if there are keys missing in a given config dict, and if so, updates the config file accordingly. This essentially automatically ports jrnl installations if new config parameters are introduced in later versions.""" diff --git a/jrnl/jrnl.py b/jrnl/jrnl.py index eec9b227..d9337308 100755 --- a/jrnl/jrnl.py +++ b/jrnl/jrnl.py @@ -109,7 +109,7 @@ def touch_journal(filename): def update_config(config, new_config, scope): """Updates a config dict with new values - either global if scope is None - of config['journals'][scope] is just a string pointing to a journal file, + or config['journals'][scope] is just a string pointing to a journal file, or within the scope""" if scope and type(config['journals'][scope]) is dict: # Update to journal specific config['journals'][scope].update(new_config) @@ -127,7 +127,7 @@ def cli(manual_args=None): util.prompt("[There seems to be something wrong with your jrnl config at {0}: {1}]".format(CONFIG_PATH, e.message)) util.prompt("[Entry was NOT added to your journal]") sys.exit(1) - install.update_config(config, config_path=CONFIG_PATH) + install.upgrade_config(config, config_path=CONFIG_PATH) original_config = config.copy() # check if the configuration is supported by available modules