浏览代码

Really fix EDEADLK bug

Jonas Borgström 11 年之前
父节点
当前提交
af3e78e6b2
共有 1 个文件被更改,包括 1 次插入1 次删除
  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