|
1 | | -#! /usr/bin/env python3 |
2 | | - |
3 | 1 | '''SMTP/ESMTP client class. |
4 | 2 |
|
5 | 3 | This should follow RFC 821 (SMTP), RFC 1869 (ESMTP), RFC 2554 (SMTP |
@@ -105,7 +103,7 @@ class SMTPSenderRefused(SMTPResponseException): |
105 | 103 | """Sender address refused. |
106 | 104 |
|
107 | 105 | In addition to the attributes set by on all SMTPResponseException |
108 | | - exceptions, this sets `sender' to the string that the SMTP refused. |
| 106 | + exceptions, this sets 'sender' to the string that the SMTP refused. |
109 | 107 | """ |
110 | 108 |
|
111 | 109 | def __init__(self, code, msg, sender): |
@@ -182,8 +180,7 @@ def _fix_eols(data): |
182 | 180 |
|
183 | 181 | try: |
184 | 182 | hmac.digest(b'', b'', 'md5') |
185 | | -# except ValueError: |
186 | | -except (ValueError, AttributeError): # TODO: RUSTPYTHON |
| 183 | +except ValueError: |
187 | 184 | _have_cram_md5_support = False |
188 | 185 | else: |
189 | 186 | _have_cram_md5_support = True |
@@ -325,7 +322,7 @@ def _get_socket(self, host, port, timeout): |
325 | 322 | def connect(self, host='localhost', port=0, source_address=None): |
326 | 323 | """Connect to a host on a given port. |
327 | 324 |
|
328 | | - If the hostname ends with a colon (`:') followed by a number, and |
| 325 | + If the hostname ends with a colon (':') followed by a number, and |
329 | 326 | there is no port specified, that suffix will be stripped off and the |
330 | 327 | number interpreted as the port number to use. |
331 | 328 |
|
@@ -356,7 +353,7 @@ def connect(self, host='localhost', port=0, source_address=None): |
356 | 353 | return (code, msg) |
357 | 354 |
|
358 | 355 | def send(self, s): |
359 | | - """Send `s' to the server.""" |
| 356 | + """Send 's' to the server.""" |
360 | 357 | if self.debuglevel > 0: |
361 | 358 | self._print_debug('send:', repr(s)) |
362 | 359 | if self.sock: |
|
0 commit comments