mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-10 16:48:31 +02:00
Fix a logic bug so that jrnl -h and jrnl -v are possible even if jrnl not configured yet.
This commit is contained in:
parent
da9be85198
commit
9cc37f964f
3 changed files with 9 additions and 6 deletions
|
@ -4,6 +4,7 @@ Changelog
|
||||||
|
|
||||||
### 1.7 (December 22, 2013)
|
### 1.7 (December 22, 2013)
|
||||||
|
|
||||||
|
* __1.7.9__ Fix a logic bug so that jrnl -h and jrnl -v are possible even if jrnl not configured yet.
|
||||||
* __1.7.8__ Upgrade to parsedatetime 1.2
|
* __1.7.8__ Upgrade to parsedatetime 1.2
|
||||||
* __1.7.7__ Cleaned up imports, better unicode support
|
* __1.7.7__ Cleaned up imports, better unicode support
|
||||||
* __1.7.6__ Python 3 port for slugify
|
* __1.7.6__ Python 3 port for slugify
|
||||||
|
|
|
@ -8,7 +8,7 @@ jrnl is a simple journal application for your command line.
|
||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
|
|
||||||
__title__ = 'jrnl'
|
__title__ = 'jrnl'
|
||||||
__version__ = '1.7.8'
|
__version__ = '1.7.9'
|
||||||
__author__ = 'Manuel Ebert'
|
__author__ = 'Manuel Ebert'
|
||||||
__license__ = 'MIT License'
|
__license__ = 'MIT License'
|
||||||
__copyright__ = 'Copyright 2013 - 2014 Manuel Ebert'
|
__copyright__ = 'Copyright 2013 - 2014 Manuel Ebert'
|
||||||
|
|
12
jrnl/cli.py
12
jrnl/cli.py
|
@ -100,6 +100,13 @@ def update_config(config, new_config, scope, force_local=False):
|
||||||
config.update(new_config)
|
config.update(new_config)
|
||||||
|
|
||||||
def run(manual_args=None):
|
def run(manual_args=None):
|
||||||
|
args = parse_args(manual_args)
|
||||||
|
|
||||||
|
if args.version:
|
||||||
|
version_str = "{0} version {1}".format(jrnl.__title__, jrnl.__version__)
|
||||||
|
print(util.py2encode(version_str))
|
||||||
|
sys.exit(0)
|
||||||
|
|
||||||
if not os.path.exists(CONFIG_PATH):
|
if not os.path.exists(CONFIG_PATH):
|
||||||
config = install.install_jrnl(CONFIG_PATH)
|
config = install.install_jrnl(CONFIG_PATH)
|
||||||
else:
|
else:
|
||||||
|
@ -112,12 +119,7 @@ def run(manual_args=None):
|
||||||
util.prompt("According to your jrnl_conf, your journal is encrypted, however PyCrypto was not found. To open your journal, install the PyCrypto package from http://www.pycrypto.org.")
|
util.prompt("According to your jrnl_conf, your journal is encrypted, however PyCrypto was not found. To open your journal, install the PyCrypto package from http://www.pycrypto.org.")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
args = parse_args(manual_args)
|
|
||||||
|
|
||||||
if args.version:
|
|
||||||
version_str = "{0} version {1}".format(jrnl.__title__, jrnl.__version__)
|
|
||||||
print(util.py2encode(version_str))
|
|
||||||
sys.exit(0)
|
|
||||||
|
|
||||||
# If the first textual argument points to a journal file,
|
# If the first textual argument points to a journal file,
|
||||||
# use this!
|
# use this!
|
||||||
|
|
Loading…
Add table
Reference in a new issue