Commits

Robert Brewer  committed a68c2d3

Changed #837 / [2063] to switch on behavior, not version_info.

  • Participants
  • Parent commits ced602f

Comments (0)

Files changed (1)

File cherrypy/wsgiserver/__init__.py

     import cStringIO as StringIO
 except ImportError:
     import StringIO
+
+_fileobject_uses_str_type = isinstance(socket._fileobject(None)._rbuf, basestring)
+
 import sys
 import threading
 import time
     """Exception raised when the SSL implementation signals a fatal alert."""
     pass
 
-if sys.version_info[:2] >= (2, 6) or sys.version_info[:3] >= (2, 5, 2):
+
+if not _fileobject_uses_str_type:
     class CP_fileobject(socket._fileobject):
         """Faux file object attached to a socket object."""