summaryrefslogtreecommitdiff
path: root/wsgitools/scgi/asynchronous.py
diff options
context:
space:
mode:
authorHelmut Grohne <helmut@subdivi.de>2007-09-20 13:27:45 +0200
committerHelmut Grohne <helmut@subdivi.de>2007-09-20 13:27:45 +0200
commitfa9c543d4916fe22dbad6044f8bf09f0cbbc36c7 (patch)
tree5194f43662de44553b40e905ee6f475057d00fd1 /wsgitools/scgi/asynchronous.py
parent27f7fd0e8882e919cb6b2798eb6b8f1feb2d7829 (diff)
downloadwsgitools-fa9c543d4916fe22dbad6044f8bf09f0cbbc36c7.tar.gz
added assertions for not getting unicode strings
Diffstat (limited to 'wsgitools/scgi/asynchronous.py')
-rw-r--r--wsgitools/scgi/asynchronous.py2
1 files changed, 2 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: