From fa9c543d4916fe22dbad6044f8bf09f0cbbc36c7 Mon Sep 17 00:00:00 2001 From: Helmut Grohne Date: Thu, 20 Sep 2007 13:27:45 +0200 Subject: added assertions for not getting unicode strings --- wsgitools/scgi/asynchronous.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'wsgitools/scgi/asynchronous.py') 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: -- cgit v1.2.3