From 887250cd06329605cbf39b4d8222ce6f0fa5d65b Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Wed, 24 Apr 2019 23:26:16 +1000 Subject: [PATCH] PEP fixes --- InvenTree/key.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/InvenTree/key.py b/InvenTree/key.py index 60ff54df18..c28b9c6a30 100644 --- a/InvenTree/key.py +++ b/InvenTree/key.py @@ -6,11 +6,13 @@ import os fn = 'secret_key.txt' + def generate_key(): options = string.digits + string.ascii_letters + string.punctuation key = ''.join([random.choice(options) for i in range(50)]) return key + if __name__ == '__main__': # Ensure key file is placed in same directory as this script @@ -19,4 +21,4 @@ if __name__ == '__main__': with open(key_file, 'w') as kf: kf.write(generate_key()) - print('Generated SECRET_KEY to {f}'.format(f=key_file)) \ No newline at end of file + print('Generated SECRET_KEY to {f}'.format(f=key_file))