mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 10:44:36 +08:00
Update smtplib.py from 3.14.3
This commit is contained in:
1 parent
edb92b93d5
commit
7d958b653f
1 file changed
+4
-7
+4
-7
@@ -1,5 +1,3 @@
|
||||
#! /usr/bin/env python3
|
||||
|
||||
'''SMTP/ESMTP client class.
|
||||
|
||||
This should follow RFC 821 (SMTP), RFC 1869 (ESMTP), RFC 2554 (SMTP
|
||||
@@ -105,7 +103,7 @@ class SMTPSenderRefused(SMTPResponseException):
|
||||
"""Sender address refused.
|
||||
|
||||
In addition to the attributes set by on all SMTPResponseException
|
||||
exceptions, this sets `sender' to the string that the SMTP refused.
|
||||
exceptions, this sets 'sender' to the string that the SMTP refused.
|
||||
"""
|
||||
|
||||
def __init__(self, code, msg, sender):
|
||||
@@ -182,8 +180,7 @@ def _fix_eols(data):
|
||||
|
||||
try:
|
||||
hmac.digest(b'', b'', 'md5')
|
||||
# except ValueError:
|
||||
except (ValueError, AttributeError): # TODO: RUSTPYTHON
|
||||
except ValueError:
|
||||
_have_cram_md5_support = False
|
||||
else:
|
||||
_have_cram_md5_support = True
|
||||
@@ -325,7 +322,7 @@ class SMTP:
|
||||
def connect(self, host='localhost', port=0, source_address=None):
|
||||
"""Connect to a host on a given port.
|
||||
|
||||
If the hostname ends with a colon (`:') followed by a number, and
|
||||
If the hostname ends with a colon (':') followed by a number, and
|
||||
there is no port specified, that suffix will be stripped off and the
|
||||
number interpreted as the port number to use.
|
||||
|
||||
@@ -356,7 +353,7 @@ class SMTP:
|
||||
return (code, msg)
|
||||
|
||||
def send(self, s):
|
||||
"""Send `s' to the server."""
|
||||
"""Send 's' to the server."""
|
||||
if self.debuglevel > 0:
|
||||
self._print_debug('send:', repr(s))
|
||||
if self.sock:
|
||||
|
||||
Reference in new issue
Block a user