mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-07-06 16:26:13 +02:00
fixed name-clash + unit tests
This commit is contained in:
parent
680b942325
commit
240e85d7d5
4 changed files with 34 additions and 3 deletions
|
@ -36,7 +36,7 @@ def upgrade_config(config):
|
|||
)
|
||||
|
||||
|
||||
def get_default_config():
|
||||
def find_default_config():
|
||||
config_path = (
|
||||
get_config_path()
|
||||
if os.path.exists(get_config_path())
|
||||
|
@ -45,7 +45,7 @@ def get_default_config():
|
|||
return config_path
|
||||
|
||||
|
||||
def get_alt_config(alt_config):
|
||||
def find_alt_config(alt_config):
|
||||
if os.path.exists(alt_config):
|
||||
return alt_config
|
||||
else:
|
||||
|
@ -62,7 +62,7 @@ def load_or_install_jrnl(alt_config):
|
|||
If alternate config is specified via --config-file flag, it will be used.
|
||||
Else, perform various prompts to install jrnl.
|
||||
"""
|
||||
config_path = get_alt_config(alt_config) if alt_config else get_default_config()
|
||||
config_path = find_alt_config(alt_config) if alt_config else find_default_config()
|
||||
|
||||
if os.path.exists(config_path):
|
||||
logging.debug("Reading configuration from file %s", config_path)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue