Only import bugsnag if we're going to use it.

This commit is contained in:
2016-05-23 12:05:35 +02:00
parent 4f509951a7
commit 06ffffa044

View File

@@ -3,9 +3,6 @@ import os
import tempfile import tempfile
from bson import ObjectId from bson import ObjectId
from datetime import datetime from datetime import datetime
import bugsnag
import bugsnag.flask
import bugsnag.handlers
from zencoder import Zencoder from zencoder import Zencoder
from flask import g from flask import g
from flask import request from flask import request
@@ -119,6 +116,10 @@ if app.config['DEBUG']:
# Configure Bugsnag # Configure Bugsnag
if not app.config.get('TESTING') and app.config.get('BUGSNAG_API_KEY'): if not app.config.get('TESTING') and app.config.get('BUGSNAG_API_KEY'):
import bugsnag
import bugsnag.flask
import bugsnag.handlers
bugsnag.configure( bugsnag.configure(
api_key=app.config['BUGSNAG_API_KEY'], api_key=app.config['BUGSNAG_API_KEY'],
project_root="/data/git/pillar/pillar", project_root="/data/git/pillar/pillar",