Skip to content

Commit

Permalink
parts: If returned a callable, open the escape hatch.
Browse files Browse the repository at this point in the history
  • Loading branch information
MostAwesomeDude committed Nov 7, 2012
1 parent 5052a2b commit 3219379
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions flask_holster/parts.py
Expand Up @@ -11,6 +11,12 @@ def _worker(app, view, *args, **kwargs):
"""

d = view(*args, **kwargs)

if callable(d):
# We've been hoodwinked! It's pretty likely that d is a handcrafted
# response. Should we let it through as-is? Yes.
return d

mime = g.mime.plain()

overrides = getattr(view, "_holsters", {})
Expand Down

0 comments on commit 3219379

Please sign in to comment.