diff --git a/encrypted_secrets/util.py b/encrypted_secrets/util.py index 7fd5a5f..7a0bf7a 100644 --- a/encrypted_secrets/util.py +++ b/encrypted_secrets/util.py @@ -29,7 +29,8 @@ def write_secrets(message, key=secrets_conf.ENCRYPTED_SECRETS_KEY, encrypted_sec def read_secrets(encrypted_secrets_file_path=secrets_conf.ENCRYPTED_SECRETS_PATH, key=secrets_conf.ENCRYPTED_SECRETS_KEY): key_file_exists = os.path.isfile(encrypted_secrets_file_path) - if not key_file_exists: + # To handle first-run of init_secrets command when key is not yet set: + if key is None or not key_file_exists: return False with open(encrypted_secrets_file_path, 'r') as encrypted_secrets_file: diff --git a/setup.py b/setup.py index 8d772f7..3a395dc 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ setup( name='django-encrypted-secrets', - version='0.9.8', + version='0.9.9', packages=find_packages(), author='Axiomatic LLC', author_email='contact@axiomatic.im',