Revision aa65ed72
b/lib/utils.py | ||
---|---|---|
1217 | 1217 |
try: |
1218 | 1218 |
fcntl.flock(self.fd, flag) |
1219 | 1219 |
except IOError, err: |
1220 |
logging.exception("fcntl.flock failed") |
|
1221 | 1220 |
if err.errno in (errno.EAGAIN, ): |
1222 | 1221 |
raise errors.LockError(errmsg) |
1223 |
raise |
|
1222 |
else: |
|
1223 |
logging.exception("fcntl.flock failed") |
|
1224 |
raise |
|
1224 | 1225 |
|
1225 | 1226 |
def Exclusive(self, blocking=False): |
1226 | 1227 |
"""Locks the file in exclusive mode. |
Also available in: Unified diff