Browse Source

Better internal method name

pull/300/head
Armin Ronacher 14 years ago
parent
commit
ac99cd33a8
  1. 2
      flask/debughelpers.py
  2. 4
      flask/wrappers.py

2
flask/debughelpers.py

@ -33,7 +33,7 @@ class DebugFilesKeyError(KeyError, AssertionError):
return self.msg return self.msg
def make_enctype_error_multidict(request): def attach_enctype_error_multidict(request):
"""Since Flask 0.8 we're monkeypatching the files object in case a """Since Flask 0.8 we're monkeypatching the files object in case a
request is detected that does not use multipart form data but the files request is detected that does not use multipart form data but the files
object is accessed. object is accessed.

4
flask/wrappers.py

@ -12,7 +12,7 @@
from werkzeug.wrappers import Request as RequestBase, Response as ResponseBase from werkzeug.wrappers import Request as RequestBase, Response as ResponseBase
from werkzeug.utils import cached_property from werkzeug.utils import cached_property
from .debughelpers import make_enctype_error_multidict from .debughelpers import attach_enctype_error_multidict
from .helpers import json, _assert_have_json from .helpers import json, _assert_have_json
from .globals import _request_ctx_stack from .globals import _request_ctx_stack
@ -108,7 +108,7 @@ class Request(RequestBase):
ctx = _request_ctx_stack.top ctx = _request_ctx_stack.top
if ctx is not None and ctx.app.debug and \ if ctx is not None and ctx.app.debug and \
self.mimetype != 'multipart/form-data' and not self.files: self.mimetype != 'multipart/form-data' and not self.files:
make_enctype_error_multidict(self) attach_enctype_error_multidict(self)
class Response(ResponseBase): class Response(ResponseBase):

Loading…
Cancel
Save