Issue #4302: Minor corrections to smtplib. (Backport r60975)
This commit is contained in:
parent
478a1aa537
commit
6f63190ded
|
@ -315,7 +315,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:
|
||||
|
@ -503,7 +503,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…
Reference in New Issue