Commits

Jason R. Coombs committed e822409

Fallback to system subprocess module on platforms where the cPython 2.7 subprocess module is not viable. Fixes #1292.

Comments (0)

Files changed (1)

cherrypy/_cpcompat.py

 
 # Use subprocess module from Python 2.7 on Python 2.3-2.6
 if sys.version_info < (2,7):
-    import cherrypy._cpcompat_subprocess as subprocess
+    try:
+        import cherrypy._cpcompat_subprocess as subprocess
+    except ImportError:
+        # Some implementations (Jython) don't have fcntl, so fallback
+        import subprocess
 else:
     import subprocess