]> arthur.barton.de Git - bup.git/commit
metadata: accept EOPNOTSUPP for lchmod()
authorJohannes Berg <johannes@sipsolutions.net>
Sun, 12 Sep 2021 18:58:45 +0000 (20:58 +0200)
committerRob Browning <rlb@defaultvalue.org>
Sun, 12 Sep 2021 20:36:54 +0000 (15:36 -0500)
commit8512701b4a41b4a7472975cc4c0a906d01b1a514
tree8e6259abf102f8b7649bed7e53871724d1501064
parent51e0158c85a3519be1b3bc5ac4f1349f5010923c
metadata: accept EOPNOTSUPP for lchmod()

On some systems (e.g. mine, Fedora 33) python2 has
(started to have?) lchmod(), as glibc has it, but
that always only returns EOPNOTSUPP if you really
try to operate on a symlink. Allow for that and
handle it just like ENOSYS.

Note that the handling of ENOSYS is wrong, since
integers can't be thrown or caught - pylint found
this as well, but since I'm fixing EOPNOTSUPP here
I need to fix that at the same time.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
lib/bup/metadata.py