Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
a16387ab
Commit
a16387ab
authored
May 29, 2019
by
Ying Wang
Committed by
Giampaolo Rodola
May 30, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-24564: shutil.copystat(): ignore EINVAL on os.setxattr() (GH-13369)
parent
80878312
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
Lib/shutil.py
Lib/shutil.py
+3
-2
Misc/NEWS.d/next/Library/2019-05-16-23-40-36.bpo-24564.lIwV_7.rst
...S.d/next/Library/2019-05-16-23-40-36.bpo-24564.lIwV_7.rst
+3
-0
No files found.
Lib/shutil.py
View file @
a16387ab
...
...
@@ -309,7 +309,7 @@ if hasattr(os, 'listxattr'):
try
:
names
=
os
.
listxattr
(
src
,
follow_symlinks
=
follow_symlinks
)
except
OSError
as
e
:
if
e
.
errno
not
in
(
errno
.
ENOTSUP
,
errno
.
ENODATA
):
if
e
.
errno
not
in
(
errno
.
ENOTSUP
,
errno
.
ENODATA
,
errno
.
EINVAL
):
raise
return
for
name
in
names
:
...
...
@@ -317,7 +317,8 @@ if hasattr(os, 'listxattr'):
value
=
os
.
getxattr
(
src
,
name
,
follow_symlinks
=
follow_symlinks
)
os
.
setxattr
(
dst
,
name
,
value
,
follow_symlinks
=
follow_symlinks
)
except
OSError
as
e
:
if
e
.
errno
not
in
(
errno
.
EPERM
,
errno
.
ENOTSUP
,
errno
.
ENODATA
):
if
e
.
errno
not
in
(
errno
.
EPERM
,
errno
.
ENOTSUP
,
errno
.
ENODATA
,
errno
.
EINVAL
):
raise
else
:
def
_copyxattr
(
*
args
,
**
kwargs
):
...
...
Misc/NEWS.d/next/Library/2019-05-16-23-40-36.bpo-24564.lIwV_7.rst
0 → 100644
View file @
a16387ab
:func:`shutil.copystat` now ignores :const:`errno.EINVAL` on :func:`os.setxattr` which may occur when copying files on filesystems without extended attributes support.
Original patch by Giampaolo Rodola, updated by Ying Wang.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment