1. cherrypy
  2. CherryPy

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.

  • Participants
  • Parent commits 6e29506
  • Branches cherrypy-3.2.x

Comments (0)

Files changed (1)

File cherrypy/_cpcompat.py

View file
  • Ignore whitespace
 
 # 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