Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

conf: restore flock->lockf (missed during merge), which translates to…

… actual portable fcntl call
  • Loading branch information...
commit add20fa19fb7664d7e62a8f1994a10769ec7611d 1 parent 89f3033
@mk-fg authored
Showing with 4 additions and 5 deletions.
  1. +1 −1  setup.py
  2. +3 −4 skydrive/portalocker.py
View
2  setup.py
@@ -14,7 +14,7 @@
setup(
name='python-skydrive',
- version='13.03.25',
+ version='13.03.26',
author='Mike Kazantsev, Antonio Chen',
author_email='mk.fraggod@gmail.com',
license='WTFPL',
View
7 skydrive/portalocker.py
@@ -23,14 +23,13 @@ def unlock(file):
win32file.UnlockFileEx(hfile, 0, 0x7FFFFFFF, __overlapped)
elif os.name == 'posix':
- import fcntl
- from fcntl import LOCK_EX, LOCK_SH, LOCK_NB
+ from fcntl import lockf, LOCK_EX, LOCK_SH, LOCK_NB
def lock(file, flags):
- fcntl.flock(file.fileno(), flags)
+ lockf(file, flags)
def unlock(file):
- fcntl.flock(file.fileno(), fcntl.LOCK_UN)
+ lockf(file, fcntl.LOCK_UN)
else:
raise RuntimeError("PortaLocker only defined for nt and posix platforms")
Please sign in to comment.
Something went wrong with that request. Please try again.