From 06ffffa0445c6dbf1662d02c0ff72ffd5716b644 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Mon, 23 May 2016 12:05:35 +0200 Subject: [PATCH] Only import bugsnag if we're going to use it. --- pillar/application/__init__.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pillar/application/__init__.py b/pillar/application/__init__.py index f2fc90a4..e593a0ac 100644 --- a/pillar/application/__init__.py +++ b/pillar/application/__init__.py @@ -3,9 +3,6 @@ import os import tempfile from bson import ObjectId from datetime import datetime -import bugsnag -import bugsnag.flask -import bugsnag.handlers from zencoder import Zencoder from flask import g from flask import request @@ -119,6 +116,10 @@ if app.config['DEBUG']: # Configure Bugsnag if not app.config.get('TESTING') and app.config.get('BUGSNAG_API_KEY'): + import bugsnag + import bugsnag.flask + import bugsnag.handlers + bugsnag.configure( api_key=app.config['BUGSNAG_API_KEY'], project_root="/data/git/pillar/pillar",