Browse Source

Some cleanups

pull/843/merge
Armin Ronacher 12 years ago
parent
commit
8f1dada542
  1. 3
      flask/app.py
  2. 2
      flask/debughelpers.py
  3. 2
      flask/json.py

3
flask/app.py

@ -1158,7 +1158,6 @@ class Flask(_PackageBoundObject):
"""
self.jinja_env.tests[name or f.__name__] = f
@setupmethod
def template_global(self, name=None):
"""A decorator that is used to register a custom template global function.
@ -1710,7 +1709,7 @@ class Flask(_PackageBoundObject):
if bp is not None and bp in self.teardown_request_funcs:
funcs = chain(funcs, reversed(self.teardown_request_funcs[bp]))
for func in funcs:
rv = func(exc)
func(exc)
request_tearing_down.send(self, exc=exc)
def do_teardown_appcontext(self, exc=None):

2
flask/debughelpers.py

@ -78,7 +78,7 @@ def attach_enctype_error_multidict(request):
def __getitem__(self, key):
try:
return oldcls.__getitem__(self, key)
except KeyError as e:
except KeyError:
if key not in request.form:
raise
raise DebugFilesKeyError(request, key)

2
flask/json.py

@ -232,7 +232,7 @@ def jsonify(*args, **kwargs):
"""
indent = None
if current_app.config['JSONIFY_PRETTYPRINT_REGULAR'] \
and not request.is_xhr:
and not request.is_xhr:
indent = 2
return current_app.response_class(dumps(dict(*args, **kwargs),
indent=indent),

Loading…
Cancel
Save