mirror of
https://github.com/moparisthebest/SickRage
synced 2024-12-04 15:12:23 -05:00
Added detection of fs unsupported link creation.
Function acquire will run in infinite loop if the fs doesn't support link creation(OSError: (38, 'Function not implemented'))
This commit is contained in:
parent
c62d8f2c79
commit
de6cd8d9f1
@ -28,7 +28,9 @@ class LinkLockFile(LockBase):
|
||||
# Try and create a hard link to it.
|
||||
try:
|
||||
os.link(self.unique_name, self.lock_file)
|
||||
except OSError:
|
||||
except OSError as e:
|
||||
if e.errno == 38:
|
||||
raise LockFailed("%s" % e.strerror)
|
||||
# Link creation failed. Maybe we've double-locked?
|
||||
nlinks = os.stat(self.unique_name).st_nlink
|
||||
if nlinks == 2:
|
||||
|
Loading…
Reference in New Issue
Block a user