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
cfcc9779
Kaydet (Commit)
cfcc9779
authored
Agu 10, 2011
tarafından
Éric Araujo
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Remove unused names in except clauses
üst
25785e9c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
shutil.py
Lib/shutil.py
+3
-3
No files found.
Lib/shutil.py
Dosyayı görüntüle @
cfcc9779
...
@@ -267,7 +267,7 @@ def rmtree(path, ignore_errors=False, onerror=None):
...
@@ -267,7 +267,7 @@ def rmtree(path, ignore_errors=False, onerror=None):
names
=
[]
names
=
[]
try
:
try
:
names
=
os
.
listdir
(
path
)
names
=
os
.
listdir
(
path
)
except
os
.
error
as
err
:
except
os
.
error
:
onerror
(
os
.
listdir
,
path
,
sys
.
exc_info
())
onerror
(
os
.
listdir
,
path
,
sys
.
exc_info
())
for
name
in
names
:
for
name
in
names
:
fullname
=
os
.
path
.
join
(
path
,
name
)
fullname
=
os
.
path
.
join
(
path
,
name
)
...
@@ -280,7 +280,7 @@ def rmtree(path, ignore_errors=False, onerror=None):
...
@@ -280,7 +280,7 @@ def rmtree(path, ignore_errors=False, onerror=None):
else
:
else
:
try
:
try
:
os
.
remove
(
fullname
)
os
.
remove
(
fullname
)
except
os
.
error
as
err
:
except
os
.
error
:
onerror
(
os
.
remove
,
fullname
,
sys
.
exc_info
())
onerror
(
os
.
remove
,
fullname
,
sys
.
exc_info
())
try
:
try
:
os
.
rmdir
(
path
)
os
.
rmdir
(
path
)
...
@@ -323,7 +323,7 @@ def move(src, dst):
...
@@ -323,7 +323,7 @@ def move(src, dst):
raise
Error
(
"Destination path '
%
s' already exists"
%
real_dst
)
raise
Error
(
"Destination path '
%
s' already exists"
%
real_dst
)
try
:
try
:
os
.
rename
(
src
,
real_dst
)
os
.
rename
(
src
,
real_dst
)
except
OSError
as
exc
:
except
OSError
:
if
os
.
path
.
isdir
(
src
):
if
os
.
path
.
isdir
(
src
):
if
_destinsrc
(
src
,
dst
):
if
_destinsrc
(
src
,
dst
):
raise
Error
(
"Cannot move a directory '
%
s' into itself '
%
s'."
%
(
src
,
dst
))
raise
Error
(
"Cannot move a directory '
%
s' into itself '
%
s'."
%
(
src
,
dst
))
...
...
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