Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
4cd7b9c3
Kaydet (Commit)
4cd7b9c3
authored
Şub 05, 2013
tarafından
Hynek Schlawack
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
#17076: Make copying of xattrs more permissive of missing FS support
Patch by Thomas Wouters.
üst
1f0044c4
0beab058
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
1 deletion
+21
-1
shutil.py
Lib/shutil.py
+7
-1
test_shutil.py
Lib/test/test_shutil.py
+11
-0
NEWS
Misc/NEWS
+3
-0
No files found.
Lib/shutil.py
Dosyayı görüntüle @
4cd7b9c3
...
...
@@ -140,7 +140,13 @@ if hasattr(os, 'listxattr'):
"""
for
name
in
os
.
listxattr
(
src
,
follow_symlinks
=
follow_symlinks
):
try
:
names
=
os
.
listxattr
(
src
,
follow_symlinks
=
follow_symlinks
)
except
OSError
as
e
:
if
e
.
errno
not
in
(
errno
.
ENOTSUP
,
errno
.
ENODATA
):
raise
return
for
name
in
names
:
try
:
value
=
os
.
getxattr
(
src
,
name
,
follow_symlinks
=
follow_symlinks
)
os
.
setxattr
(
dst
,
name
,
value
,
follow_symlinks
=
follow_symlinks
)
...
...
Lib/test/test_shutil.py
Dosyayı görüntüle @
4cd7b9c3
...
...
@@ -450,6 +450,17 @@ class TestShutil(unittest.TestCase):
self
.
assertIn
(
'user.bar'
,
os
.
listxattr
(
dst
))
finally
:
os
.
setxattr
=
orig_setxattr
# the source filesystem not supporting xattrs should be ok, too.
def
_raise_on_src
(
fname
,
*
,
follow_symlinks
=
True
):
if
fname
==
src
:
raise
OSError
(
errno
.
ENOTSUP
,
'Operation not supported'
)
return
orig_listxattr
(
fname
,
follow_symlinks
=
follow_symlinks
)
try
:
orig_listxattr
=
os
.
listxattr
os
.
listxattr
=
_raise_on_src
shutil
.
_copyxattr
(
src
,
dst
)
finally
:
os
.
listxattr
=
orig_listxattr
# test that shutil.copystat copies xattrs
src
=
os
.
path
.
join
(
tmp_dir
,
'the_original'
)
...
...
Misc/NEWS
Dosyayı görüntüle @
4cd7b9c3
...
...
@@ -235,6 +235,9 @@ Core and Builtins
Library
-------
-
Issue
#
17076
:
Make
copying
of
xattrs
more
permissive
of
missing
FS
support
.
Patch
by
Thomas
Wouters
.
-
Issue
#
17089
:
Expat
parser
now
correctly
works
with
string
input
not
only
when
an
internal
XML
encoding
is
UTF
-
8
or
US
-
ASCII
.
It
now
accepts
bytes
and
strings
larger
than
2
GiB
.
...
...
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