mirror of
https://github.com/python/cpython.git
synced 2025-07-28 21:55:21 +00:00
Issue 1776581. Minor corrections to smtplib, and two small tests.
Thanks Alan McIntyre.
This commit is contained in:
parent
fc2d01032f
commit
1660933d23
2 changed files with 5 additions and 4 deletions
|
@ -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()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue