Tweaks to init code

This commit is contained in:
2016-03-14 17:02:12 +01:00
parent f90f25d373
commit 5c6bda1ba3

View File

@@ -105,14 +105,19 @@ bugsnag.configure(
) )
handle_exceptions(app) handle_exceptions(app)
# Storage backend (GCS) # Google Cloud project
try: try:
os.environ['GOOGLE_APPLICATION_CREDENTIALS'] = \ os.environ['GOOGLE_APPLICATION_CREDENTIALS'] = \
app.config['GOOGLE_APPLICATION_CREDENTIALS'] app.config['GCLOUD_APP_CREDENTIALS']
except KeyError: except KeyError:
log.debug("The GOOGLE_APPLICATION_CREDENTIALS configuration value should " raise SystemExit('GOOGLE_APPLICATION_CREDENTIALS configuration is missing')
"point to an existing and valid JSON file.")
raise # Storage backend (GCS)
try:
os.environ['GCLOUD_PROJECT'] = \
app.config['GCLOUD_PROJECT']
except KeyError:
raise SystemExit('GCLOUD_PROJECT configuration value is missing')
# Algolia search # Algolia search