Skip to content

Commit

Permalink
Fix for issue wherein load_secrets() fails (in manage.py)
Browse files Browse the repository at this point in the history
if added before init_secrets is run
  • Loading branch information
nzaillian committed Jun 2, 2020
1 parent a7a2573 commit d74436f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion encrypted_secrets/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit d74436f

Please sign in to comment.