diff options
Diffstat (limited to 'Lib/email/Utils.py')
-rw-r--r-- | Lib/email/Utils.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Lib/email/Utils.py b/Lib/email/Utils.py index f8e48ef..927d67e 100644 --- a/Lib/email/Utils.py +++ b/Lib/email/Utils.py @@ -20,7 +20,6 @@ from rfc822 import mktime_tz # We need wormarounds for bugs in these methods in older Pythons (see below) from rfc822 import parsedate as _parsedate from rfc822 import parsedate_tz as _parsedate_tz -from rfc822 import parseaddr as _parseaddr from quopri import decodestring as _qdecode import base64 @@ -237,7 +236,7 @@ def parsedate_tz(data): def parseaddr(addr): - realname, emailaddr = _parseaddr(addr) - if realname == '' and emailaddr is None: + addrs = _AddressList(addr).addresslist + if not addrs: return '', '' - return realname, emailaddr + return addrs[0] |