Commit 09ac38f3 authored by Jeremy Hylton's avatar Jeremy Hylton

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.
parent 656c1ae4
...@@ -88,9 +88,9 @@ import POSException ...@@ -88,9 +88,9 @@ import POSException
# Try to create a function that creates Unix file locks. On windows # Try to create a function that creates Unix file locks. On windows
# this will fail. # this will fail.
try: 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): def lock_file(file, error=POSException.StorageSystemError):
try: un=file.fileno() try: un=file.fileno()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment