[Zope-Checkins] CVS: Zope/ZServer - __init__.py:1.21

Brian Lloyd brian@digicool.com
Fri, 21 Dec 2001 16:17:52 -0500


Update of /cvs-repository/Zope/ZServer
In directory cvs.zope.org:/tmp/cvs-serv21607

Modified Files:
	__init__.py 
Log Message:
Merged fcntl platform bug from 2.5 branch.


=== Zope/ZServer/__init__.py 1.20 => 1.21 ===
 # brokenness in the Python 2.1 version. We need to do some funny business
 # to make this work, as a 2.2-ism crept into the asyncore code.
-import fcntl, FCNTL
-if not hasattr(fcntl, 'F_GETFL'):
-    fcntl.F_GETFL = FCNTL.F_GETFL
-    fcntl.F_SETFL = FCNTL.F_SETFL
+if os.name == 'posix':
+    import fcntl, FCNTL
+    if not hasattr(fcntl, 'F_GETFL'):
+        fcntl.F_GETFL = FCNTL.F_GETFL
+        fcntl.F_SETFL = FCNTL.F_SETFL
     
 from medusa import asyncore
 sys.modules['asyncore'] = asyncore