summaryrefslogtreecommitdiff
path: root/wsgitools/scgi/asynchronous.py
diff options
context:
space:
mode:
Diffstat (limited to 'wsgitools/scgi/asynchronous.py')
-rw-r--r--wsgitools/scgi/asynchronous.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/wsgitools/scgi/asynchronous.py b/wsgitools/scgi/asynchronous.py
index b51e7ca..ecc27fb 100644
--- a/wsgitools/scgi/asynchronous.py
+++ b/wsgitools/scgi/asynchronous.py
@@ -3,13 +3,12 @@ __all__ = []
import asyncore
import socket
import sys
+# Cannot use io module as it is broken in 2.6.
+# Writing a str to a io.StringIO results in an exception.
try:
- import io
+ import cStringIO as io
except ImportError:
- try:
- import cStringIO as io
- except ImportError:
- import StringIO as io
+ import StringIO as io
class SCGIConnection(asyncore.dispatcher):
"""SCGI connection class used by L{SCGIServer}."""