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
1660933d
Kaydet (Commit)
1660933d
authored
Şub 23, 2008
tarafından
Facundo Batista
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue 1776581. Minor corrections to smtplib, and two small tests.
Thanks Alan McIntyre.
üst
fc2d0103
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
smtplib.py
Lib/smtplib.py
+2
-2
test_smtplib.py
Lib/test/test_smtplib.py
+3
-2
No files found.
Lib/smtplib.py
Dosyayı görüntüle @
1660933d
...
...
@@ -298,7 +298,7 @@ class SMTP:
def
send
(
self
,
str
):
"""Send `str' to the server."""
if
self
.
debuglevel
>
0
:
print
>>
stderr
,
'send:'
,
repr
(
str
)
if
self
.
sock
:
if
hasattr
(
self
,
'sock'
)
and
self
.
sock
:
try
:
self
.
sock
.
sendall
(
str
)
except
socket
.
error
:
...
...
@@ -486,7 +486,7 @@ class SMTP:
vrfy
=
verify
def
expn
(
self
,
address
):
"""SMTP '
verify' command -- checks for address validity
."""
"""SMTP '
expn' command -- expands a mailing list
."""
self
.
putcmd
(
"expn"
,
quoteaddr
(
address
))
return
self
.
getreply
()
...
...
Lib/test/test_smtplib.py
Dosyayı görüntüle @
1660933d
...
...
@@ -82,8 +82,9 @@ class GeneralTests(TestCase):
# to reference the nonexistent 'sock' attribute of the SMTP object
# causes an AttributeError)
smtp
=
smtplib
.
SMTP
()
self
.
assertRaises
(
AttributeError
,
smtp
.
ehlo
)
self
.
assertRaises
(
AttributeError
,
smtp
.
send
,
'test msg'
)
self
.
assertRaises
(
smtplib
.
SMTPServerDisconnected
,
smtp
.
ehlo
)
self
.
assertRaises
(
smtplib
.
SMTPServerDisconnected
,
smtp
.
send
,
'test msg'
)
def
testLocalHostName
(
self
):
# check that supplied local_hostname is used
...
...
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