Message305528
Here's one idea for a patch (inspired by the rest of the function):
```
diff --git a/Lib/shutil.py b/Lib/shutil.py
index 464ee91..2099289 100644
--- a/Lib/shutil.py
+++ b/Lib/shutil.py
@@ -213,6 +213,13 @@ def copystat(src, dst, *, follow_symlinks=True):
# symlink. give up, suppress the error.
# (which is what shutil always did in this circumstance.)
pass
+ except OSError as why:
+ # lchmod on alpine will raise this with symlinks: #31940
+ for err in 'EOPNOTSUPP', 'ENOTSUP':
+ if hasattr(errno, err) and why.errno == getattr(errno, err):
+ break
+ else:
+ raise
if hasattr(st, 'st_flags'):
try:
lookup("chflags")(dst, st.st_flags, follow_symlinks=follow)
```
However lchmod seems to be just broken on alpine so the tests continue to fail (however my usecase is fixed) |
|
Date |
User |
Action |
Args |
2017-11-04 00:14:49 | Anthony Sottile | set | recipients:
+ Anthony Sottile |
2017-11-04 00:14:49 | Anthony Sottile | set | messageid: <1509754489.15.0.213398074469.issue31940@psf.upfronthosting.co.za> |
2017-11-04 00:14:49 | Anthony Sottile | link | issue31940 messages |
2017-11-04 00:14:49 | Anthony Sottile | create | |
|