Browse Source

Really fix EDEADLK bug

Jonas Borgström 11 năm trước cách đây
mục cha
commit
af3e78e6b2
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      attic/helpers.py

+ 1 - 1
attic/helpers.py

@@ -52,7 +52,7 @@ class UpgradableLock:
         try:
             fcntl.lockf(self.fd, fcntl.LOCK_EX)
         # Python 3.2 raises IOError, Python3.3+ raises OSError
-        except (OSError):
+        except (IOError, OSError):
             raise self.LockUpgradeFailed(self.path)
         self.is_exclusive = True