Skip to content

Commit d74436f

Browse files
committed
Fix for issue wherein load_secrets() fails (in manage.py)
if added before init_secrets is run
1 parent a7a2573 commit d74436f

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

encrypted_secrets/util.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ def write_secrets(message, key=secrets_conf.ENCRYPTED_SECRETS_KEY, encrypted_sec
2929
def read_secrets(encrypted_secrets_file_path=secrets_conf.ENCRYPTED_SECRETS_PATH, key=secrets_conf.ENCRYPTED_SECRETS_KEY):
3030
key_file_exists = os.path.isfile(encrypted_secrets_file_path)
3131

32-
if not key_file_exists:
32+
# To handle first-run of init_secrets command when key is not yet set:
33+
if key is None or not key_file_exists:
3334
return False
3435

3536
with open(encrypted_secrets_file_path, 'r') as encrypted_secrets_file:

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
setup(
1111
name='django-encrypted-secrets',
12-
version='0.9.8',
12+
version='0.9.9',
1313
packages=find_packages(),
1414
author='Axiomatic LLC',
1515
author_email='contact@axiomatic.im',

0 commit comments

Comments
 (0)