Moved import until after env setup

This commit is contained in:
Martyn Inglis
2016-03-17 13:21:01 +00:00
parent cb0b091468
commit 8b83e6a02a
2 changed files with 5 additions and 2 deletions

View File

@@ -2,7 +2,6 @@ import os
from app import create_app
from credstash import getAllSecrets
from config import configs
default_env_file = '/home/ubuntu/environment'
@@ -14,6 +13,9 @@ if os.path.isfile(default_env_file):
# on aws get secrets and export to env
os.environ.update(getAllSecrets(region="eu-west-1"))
from config import configs
os.environ['NOTIFY_API_ENVIRONMENT'] = configs[environment]
application = create_app()