]> arthur.barton.de Git - bup.git/blobdiff - lib/bup/metadata.py
metadata: accept EOPNOTSUPP for lchmod()
[bup.git] / lib / bup / metadata.py
index a20b67b492425a3462c16a49b5b0c95402c57f0a..83f04f771475457641c96e369d500b45be946a0b 100644 (file)
@@ -453,8 +453,13 @@ class Metadata:
         if _have_lchmod:
             try:
                 os.lchmod(path, stat.S_IMODE(self.mode))
-            except errno.ENOSYS:  # Function not implemented
-                pass
+            except OSError as e:
+                # - "Function not implemented"
+                # - "Operation not supported" might be generated by glibc
+                if e.errno in (errno.ENOSYS, errno.EOPNOTSUPP):
+                    pass
+                else:
+                    raise
         elif not stat.S_ISLNK(self.mode):
             os.chmod(path, stat.S_IMODE(self.mode))