[conf] set SECRET in environ
This commit is contained in:
parent
3849ba4500
commit
bdc131434b
|
@ -47,6 +47,8 @@ if IS_PROJECT:
|
||||||
try:
|
try:
|
||||||
with open(config.get('project', 'secret')) as secret_file:
|
with open(config.get('project', 'secret')) as secret_file:
|
||||||
SECRET = secret_file.read()
|
SECRET = secret_file.read()
|
||||||
|
# Set the secret so we can use it in domains
|
||||||
|
os.environ['HALFAPI_SECRET'] = SECRET
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
print('There is no file like {}'.format(config.get('project', 'secret')))
|
print('There is no file like {}'.format(config.get('project', 'secret')))
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
Loading…
Reference in New Issue