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
774a66de
Kaydet (Commit)
774a66de
authored
Şub 12, 2011
tarafından
R. David Murray
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix #11116 fix on Windows (close file before removing in MH code)
üst
fc14114c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
mailbox.py
Lib/mailbox.py
+8
-1
No files found.
Lib/mailbox.py
Dosyayı görüntüle @
774a66de
...
...
@@ -910,6 +910,7 @@ class MH(Mailbox):
new_key
=
max
(
keys
)
+
1
new_path
=
os
.
path
.
join
(
self
.
_path
,
str
(
new_key
))
f
=
_create_carefully
(
new_path
)
closed
=
False
try
:
if
self
.
_locked
:
_lock_file
(
f
)
...
...
@@ -917,6 +918,11 @@ class MH(Mailbox):
try
:
self
.
_dump_message
(
message
,
f
)
except
BaseException
:
# Unlock and close so it can be deleted on Windows
if
self
.
_locked
:
_unlock_file
(
f
)
_sync_close
(
f
)
closed
=
True
os
.
remove
(
new_path
)
raise
if
isinstance
(
message
,
MHMessage
):
...
...
@@ -925,7 +931,8 @@ class MH(Mailbox):
if
self
.
_locked
:
_unlock_file
(
f
)
finally
:
_sync_close
(
f
)
if
not
closed
:
_sync_close
(
f
)
return
new_key
def
remove
(
self
,
key
):
...
...
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