]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Replace rfc822.parseaddr with email.Utils.parseaddr. The implementation is
authorJohannes Gijsbers <jlg@dds.nl>
Sat, 8 Jan 2005 14:12:27 +0000 (14:12 +0000)
committerJohannes Gijsbers <jlg@dds.nl>
Sat, 8 Jan 2005 14:12:27 +0000 (14:12 +0000)
still the same, so there should be no backwards-compatibility problems.

Lib/smtplib.py

index 368aa8dc6a09398b4a29dcd83e998eb563b9d937..61c35772090be3b8013953b32f2c8521e414b5f9 100755 (executable)
@@ -43,7 +43,7 @@ Example:
 
 import socket
 import re
-import rfc822
+import email.Utils
 import base64
 import hmac
 from email.base64MIME import encode as encode_base64
@@ -171,7 +171,7 @@ def quoteaddr(addr):
     """
     m = (None, None)
     try:
-        m=rfc822.parseaddr(addr)[1]
+        m = email.Utils.parseaddr(addr)[1]
     except AttributeError:
         pass
     if m == (None, None): # Indicates parse failure or AttributeError