mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-10 16:48:31 +02:00
Nicer error message when there is a syntactical error in your config file.
This commit is contained in:
parent
48c5dd8aa1
commit
32f3d23b90
2 changed files with 8 additions and 1 deletions
|
@ -4,6 +4,8 @@ Changelog
|
|||
#### 1.1.0
|
||||
|
||||
* [New] JSON export exports tags as well.
|
||||
* [Improved] Nicer error message when there is a syntactical error in your config file.
|
||||
|
||||
#### 1.0.5
|
||||
|
||||
* [Improved] Backwards compatibility with `parsedatetime` 0.8.7
|
||||
|
|
|
@ -150,7 +150,12 @@ def cli():
|
|||
config = install.install_jrnl(CONFIG_PATH)
|
||||
else:
|
||||
with open(CONFIG_PATH) as f:
|
||||
config = json.load(f)
|
||||
try:
|
||||
config = json.load(f)
|
||||
except ValueError as e:
|
||||
print("[There seems to be something wrong with your jrnl config at {}: {}]".format(CONFIG_PATH, e.message))
|
||||
print("[Entry was NOT added to your journal]")
|
||||
sys.exit(-1)
|
||||
install.update_config(config, config_path=CONFIG_PATH)
|
||||
|
||||
original_config = config.copy()
|
||||
|
|
Loading…
Add table
Reference in a new issue