Bläddra i källkod

Really fix EDEADLK bug

Jonas Borgström 11 år sedan
förälder
incheckning
af3e78e6b2
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. 1 1
      attic/helpers.py

+ 1 - 1
attic/helpers.py

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