Fixed non threadsafe code

This commit is contained in:
Jeffrey Gelens 2015-03-16 13:13:40 +01:00
commit c2f2c16892
19 changed files with 32 additions and 20 deletions

View file

@ -82,7 +82,11 @@ class BaseResponse(_TemplateEnvironmentMixin):
default_region = 'us-east-1'
region_regex = r'\.(.+?)\.amazonaws\.com'
def dispatch(self, request, full_url, headers):
@classmethod
def dispatch(cls, *args, **kwargs):
return cls()._dispatch(*args, **kwargs)
def _dispatch(self, request, full_url, headers):
querystring = {}
if hasattr(request, 'body'):