diff --git a/docs/_themes/jrnl/index.html b/docs/_themes/jrnl/index.html
index b475bf51..d9010b1a 100755
--- a/docs/_themes/jrnl/index.html
+++ b/docs/_themes/jrnl/index.html
@@ -30,7 +30,7 @@
-
Documenation
+
Documentation
Fork me on GitHub
Download ▶
diff --git a/jrnl/Journal.py b/jrnl/Journal.py
index 9f922509..f9122892 100644
--- a/jrnl/Journal.py
+++ b/jrnl/Journal.py
@@ -110,7 +110,7 @@ class Journal(object):
journal = None
if 'password' in self.config:
journal = validate_password(self.config['password'])
- if not journal:
+ if journal is None:
journal = util.get_password(keychain=self.name, validator=validate_password)
else:
with codecs.open(filename, "r", "utf-8") as f:
diff --git a/jrnl/__init__.py b/jrnl/__init__.py
index 14112f4d..208872cf 100644
--- a/jrnl/__init__.py
+++ b/jrnl/__init__.py
@@ -7,7 +7,7 @@ jrnl is a simple journal application for your command line.
"""
__title__ = 'jrnl'
-__version__ = '1.6.3'
+__version__ = '1.6.4'
__author__ = 'Manuel Ebert'
__license__ = 'MIT License'
__copyright__ = 'Copyright 2013 Manuel Ebert'
diff --git a/jrnl/install.py b/jrnl/install.py
index 0ff6159b..cd1683d9 100644
--- a/jrnl/install.py
+++ b/jrnl/install.py
@@ -75,6 +75,8 @@ def install_jrnl(config_path='~/.jrnl_config'):
default_config['encrypt'] = True
if util.yesno("Do you want to store the password in your keychain?", default=True):
util.set_keychain("default", password)
+ else:
+ util.set_keychain("default", None)
print("Journal will be encrypted.")
else:
password = None
diff --git a/jrnl/util.py b/jrnl/util.py
index 7d396f72..2164d5d1 100644
--- a/jrnl/util.py
+++ b/jrnl/util.py
@@ -29,15 +29,15 @@ def get_password(validator, keychain=None, max_attempts=3):
password = pwd_from_keychain or getpass()
result = validator(password)
# Password is bad:
- if not result and pwd_from_keychain:
+ if result is None and pwd_from_keychain:
set_keychain(keychain, None)
attempt = 1
- while not result and attempt < max_attempts:
+ while result is None and attempt < max_attempts:
prompt("Wrong password, try again.")
password = getpass()
result = validator(password)
attempt += 1
- if result:
+ if result is not None:
return result
else:
prompt("Extremely wrong password.")