summaryrefslogtreecommitdiff
path: root/wsgitools
diff options
context:
space:
mode:
Diffstat (limited to 'wsgitools')
-rw-r--r--wsgitools/scgi/asynchronous.py2
-rw-r--r--wsgitools/scgi/forkpool.py2
2 files changed, 4 insertions, 0 deletions
diff --git a/wsgitools/scgi/asynchronous.py b/wsgitools/scgi/asynchronous.py
index bdb2a20..4953b05 100644
--- a/wsgitools/scgi/asynchronous.py
+++ b/wsgitools/scgi/asynchronous.py
@@ -54,6 +54,7 @@ class SCGIConnection(asyncore.dispatcher):
def _wsgi_write(self, data):
assert self.state >= SCGIConnection.REQ
+ assert isinstance(data, str)
if data:
self._try_send_headers()
self.outbuff += data
@@ -150,6 +151,7 @@ class SCGIConnection(asyncore.dispatcher):
if len(self.outbuff) < self.BLOCK_SIZE:
self._try_send_headers()
for data in self.wsgihandler:
+ assert isinstance(data, str)
if data:
self.outbuff += data
if len(self.outbuff) >= self.BLOCK_SIZE:
diff --git a/wsgitools/scgi/forkpool.py b/wsgitools/scgi/forkpool.py
index 157e320..4a07740 100644
--- a/wsgitools/scgi/forkpool.py
+++ b/wsgitools/scgi/forkpool.py
@@ -58,6 +58,7 @@ class SocketFileWrapper:
pass
def write(self, data):
"""see pep333"""
+ assert isinstance(data, str)
self.sock.send(data)
def writelines(self, lines):
"""see pep333"""
@@ -229,6 +230,7 @@ class SCGIServer:
assert hasattr(result, "__iter__")
for data in result:
+ assert isinstance(data, str)
con.send(data)
if hasattr(result, "close"):
result.close()