[issue26468] shutil.copy2 raises OSError if filesystem doesn't support chmod

Eric V. Smith added the comment: I agree that copy2 should not fail because chmod fails. Could you please provide the entire traceback message when it fails (on both 2.7 and 3.4 or 3.5)? And what OS are you running on, and what filesystem? It looks like the error happens because errno=95 (EOPNOTSUPP, probably) isn't in the list of errors that _copyxattr catches, while (ENOTSUP=134 on Linux) is. I think the documentation is also incorrect. Of course copy2 can fail: what about out of disk space? I think the documentation is trying to say that copy2 never fails because it can't preserve metadata. And the wording in the docs "copy2() never returns failure" is also odd, it should say "copy2() never raises an exception because it cannot preserve file metadata". ---------- assignee: -> docs@python components: +Documentation nosy: +docs@python, eric.smith _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue26468> _______________________________________
participants (1)
-
Eric V. Smith