Browse Source

None responses fail properly now. This fixes #24

pull/1638/head
Armin Ronacher 15 years ago
parent
commit
9248a7baca
  1. 5
      flask.py

5
flask.py

@ -752,10 +752,7 @@ class Flask(object):
:param rv: the return value from the view function :param rv: the return value from the view function
""" """
if rv is None: if rv is None:
from warnings import warn raise ValueError('View function did not return a response')
warn(Warning('View function did not return a response'),
stacklevel=2)
return u''
if isinstance(rv, self.response_class): if isinstance(rv, self.response_class):
return rv return rv
if isinstance(rv, basestring): if isinstance(rv, basestring):

Loading…
Cancel
Save