Skip to content

Commit

Permalink
Bug 854889: Disable newrelic if import or env var fail.
Browse files Browse the repository at this point in the history
  • Loading branch information
pmac committed Mar 26, 2013
1 parent 20cd725 commit 2d3a4e6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion wsgi/playdoh.wsgi
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ except ImportError:


if newrelic:
newrelic.agent.initialize(os.environ['NEWRELIC_PYTHON_INI_FILE'])
newrelic_ini = os.getenv('NEWRELIC_PYTHON_INI_FILE', False)
if newrelic_ini:
newrelic.agent.initialize(newrelic_ini)
else:
newrelic = False

os.environ['CELERY_LOADER'] = 'django'

Expand Down

0 comments on commit 2d3a4e6

Please sign in to comment.