[Zope-Checkins] CVS: StandaloneZODB/ZODB - lock_file.py:1.2
Jeremy Hylton
jeremy@zope.com
Thu, 13 Sep 2001 15:45:39 -0400
Update of /cvs-repository/StandaloneZODB/ZODB
In directory cvs.zope.org:/tmp/cvs-serv21294
Modified Files:
lock_file.py
Log Message:
Use fcntl in place of FCNTL.
FCNTL is deprecated in Python 2.2 and all its functionality is
available in fcntl in Python 2.1.
=== StandaloneZODB/ZODB/lock_file.py 1.1 => 1.2 ===
# this will fail.
try:
- import fcntl, FCNTL
+ import fcntl
- lock_file_FLAG=FCNTL.LOCK_EX|FCNTL.LOCK_NB
+ lock_file_FLAG = fcntl.LOCK_EX | fcntl.LOCK_NB
def lock_file(file, error=POSException.StorageSystemError):
try: un=file.fileno()