summaryrefslogtreecommitdiff
path: root/wsgitools/scgi/forkpool.py
diff options
context:
space:
mode:
authorHelmut Grohne <helmut@subdivi.de>2007-04-21 20:48:43 +0200
committerHelmut Grohne <helmut@subdivi.de>2007-04-21 20:48:43 +0200
commit5b5b4992ffdc3c3dc3b28c004f211288fb6affcf (patch)
tree8b2b1ac20aaea7d988ea7189cbf31d8617c66e61 /wsgitools/scgi/forkpool.py
parent5835a547893a7e89ef19e1e4e0b270b78c814a28 (diff)
downloadwsgitools-5b5b4992ffdc3c3dc3b28c004f211288fb6affcf.tar.gz
added some assertions
Diffstat (limited to 'wsgitools/scgi/forkpool.py')
-rw-r--r--wsgitools/scgi/forkpool.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/wsgitools/scgi/forkpool.py b/wsgitools/scgi/forkpool.py
index 1ff2bee..6476458 100644
--- a/wsgitools/scgi/forkpool.py
+++ b/wsgitools/scgi/forkpool.py
@@ -85,6 +85,7 @@ class SCGIServer:
maxworkers is the maximum number of workers that can be spawned on demand
maxrequests is the number of requests a worker processes before dying
"""
+ assert hasattr(error, "write")
self.wsgiapp = wsgiapp
self.port = port
self.interface = interface
@@ -217,7 +218,10 @@ class SCGIServer:
"wsgi.multithread": False,
"wsgi.multiprocess": True,
"wsgi.run_once": False})
+
result = self.wsgiapp(environ, start_response)
+ assert hasattr(result, "__iter__")
+
for data in result:
con.send(data)
if hasattr(result, "close"):