summaryrefslogtreecommitdiff
path: root/wsgitools/adapters.py
diff options
context:
space:
mode:
Diffstat (limited to 'wsgitools/adapters.py')
-rw-r--r--wsgitools/adapters.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/wsgitools/adapters.py b/wsgitools/adapters.py
index 5a4983b..6f9c203 100644
--- a/wsgitools/adapters.py
+++ b/wsgitools/adapters.py
@@ -48,6 +48,8 @@ class WSGI1to2Adapter:
return write_callable
iterable = self.app(environ, start_response)
assert hasattr(iterable, "__iter__")
+ if not results[2]:
+ return results[0], results[1], iterable
if isinstance(iterable, list):
# retaining .close attribute this way
iterable[:0] = results[2]