mirror of
https://github.com/kennethreitz/httpbin.git
synced 2026-06-05 23:00:18 +00:00
catch rewrelic import
This commit is contained in:
+7
-5
@@ -19,6 +19,13 @@ from .helpers import get_headers, status_code, get_dict, check_basic_auth, check
|
||||
from .utils import weighted_choice
|
||||
from .structures import CaseInsensitiveDict
|
||||
|
||||
try:
|
||||
import newrelic.agent
|
||||
newrelic.agent.initialize()
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
|
||||
ENV_COOKIES = (
|
||||
'_gauges_unique',
|
||||
'_gauges_unique_year',
|
||||
@@ -37,11 +44,6 @@ app = Flask(__name__)
|
||||
# Routes
|
||||
# ------
|
||||
|
||||
@app.errorhandler(500)
|
||||
def page_not_found(e):
|
||||
return ':(', 200
|
||||
|
||||
|
||||
@app.route('/')
|
||||
def view_landing_page():
|
||||
"""Generates Landing Page."""
|
||||
|
||||
Reference in New Issue
Block a user