Message1517
Trying the demo in an NFS directory (we use NetApps for
all our mass storage) causes an error because flock()
fails. Traceback from portalocker line 124 in lock says
"IOError: [Errno 37] No locks available". Easy to
reproduce with:
$ python portalocker.py
Traceback (most recent call last):
File "portalocker.py", line 136, in ?
portalocker.lock(log, portalocker.LOCK_EX)
File
"/tmp_mnt/home/moraes/roundup-0.7.8/roundup/backends/portalocker.py",
line 124, in lock
fcntl.flock(file.fileno(), flags)
IOError: [Errno 37] No locks available
Exit 1
Switching to lockf() works fine (tested on Red
Enterprise 3 Linux, Python 2.3.4) and Solaris 8/Sparc
(also Python 2.3.4).
With the attached patch, users of portalocker can switch
from lockf to flock by setting portalocker.lockmethod =
fcntl.flock.
Regards,
Mark.
|
|
Date |
User |
Action |
Args |
2009-02-03 14:21:00 | admin | link | issue1063890 messages |
2009-02-03 14:21:00 | admin | create | |
|