From 9178d76ce78f6d6e54f9051ec53be50216403e71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Borgstr=C3=B6m?= Date: Sat, 31 May 2014 15:13:49 +0200 Subject: [PATCH] Fix py3.2 specific EDEADLK related bug. --- CHANGES | 1 + attic/helpers.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 0c4679f8b..91a1956ee 100644 --- a/CHANGES +++ b/CHANGES @@ -16,6 +16,7 @@ Version 0.13 - Added cachedir support. CACHEDIR.TAG compatible cache directories can now be excluded using ``--exclude-caches`` (#74) - Fix crash on extreme mtime timestamps (year 2400+) (#81) +- Fix Python 3.2 specific lockf issue (EDEADLK) Version 0.12 ------------ diff --git a/attic/helpers.py b/attic/helpers.py index bc8ceea85..5df00da00 100644 --- a/attic/helpers.py +++ b/attic/helpers.py @@ -51,7 +51,8 @@ class UpgradableLock: def upgrade(self): try: fcntl.lockf(self.fd, fcntl.LOCK_EX) - except OSError as e: + # Python 3.2 raises IOError, Python3.3+ raises OSError + except (OSError): raise self.LockUpgradeFailed(self.path) self.is_exclusive = True