Merge in latest from datadog/dd-trace-py (#1)

This commit is contained in:
Brett Langdon
2020-02-26 11:57:16 -05:00
committed by GitHub
parent 67f43ea6ab
commit f13c716af6
635 changed files with 85235 additions and 2 deletions

View File

@ -0,0 +1,29 @@
from webhelpers import * # noqa
class ExceptionWithCodeMethod(Exception):
"""Use case where the status code is defined by
the `code()` method.
"""
def __init__(self, message):
super(ExceptionWithCodeMethod, self).__init__(message)
def code():
pass
class AppGlobals(object):
"""Object used to store application globals."""
pass
def get_render_fn():
"""Re-import the function everytime so that double-patching
is correctly tested.
"""
try:
from pylons.templating import render_mako as render
except ImportError:
from pylons.templating import render
return render