From b5a9085717ab7e37d117dacd56444619e1e1b48f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Borgstr=C3=B6m?= Date: Sat, 3 Jan 2015 23:12:47 +0100 Subject: [PATCH] Fix Python 3.2 compatibility issue with noatime open(). Closes #164. --- CHANGES | 6 ++++++ attic/archive.py | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/CHANGES b/CHANGES index e12583a06..81a3c8487 100644 --- a/CHANGES +++ b/CHANGES @@ -3,6 +3,12 @@ Attic Changelog Here you can see the full list of changes between each Attic release. +Version 0.15 +------------ + +(feature release, released on X) +- Fix Python 3.2 compatibility issue with noatime open() (#164) + Version 0.14 ------------ diff --git a/attic/archive.py b/attic/archive.py index 33770650d..d78ce4b85 100644 --- a/attic/archive.py +++ b/attic/archive.py @@ -31,6 +31,12 @@ has_mtime_ns = sys.version >= '3.3' has_lchmod = hasattr(os, 'lchmod') has_lchflags = hasattr(os, 'lchflags') +# Python <= 3.2 raises OSError instead of PermissionError (See #164) +try: + PermissionError = PermissionError +except NameError: + PermissionError = OSError + class DownloadPipeline: