Fixed some bash if blocks and removed env file from db.py

This commit is contained in:
Martyn Inglis
2016-07-04 16:57:35 +01:00
parent 0bfed1baad
commit d34ae9edbc
3 changed files with 0 additions and 13 deletions

11
db.py
View File

@@ -4,20 +4,9 @@ from app import create_app, db
from credstash import getAllSecrets
import os
default_env_file = '/home/ubuntu/environment'
environment = 'live'
if os.path.isfile(default_env_file):
with open(default_env_file, 'r') as environment_file:
environment = environment_file.readline().strip()
# 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()
manager = Manager(application)