summaryrefslogtreecommitdiffstats
path: root/Lib/email
diff options
context:
space:
mode:
authorZackery Spytz <zspytz@gmail.com>2021-07-19 16:07:54 (GMT)
committerGitHub <noreply@github.com>2021-07-19 16:07:54 (GMT)
commit89f4c34797de2f0e5045da2b97c1c8cbbb42fbb2 (patch)
tree3e61b3926880881564abf9cbbb33bca6deb85daf /Lib/email
parent1e651c6adad8e4e772a15eaa9ee659b1283a96d9 (diff)
downloadcpython-89f4c34797de2f0e5045da2b97c1c8cbbb42fbb2.zip
cpython-89f4c34797de2f0e5045da2b97c1c8cbbb42fbb2.tar.gz
cpython-89f4c34797de2f0e5045da2b97c1c8cbbb42fbb2.tar.bz2
bpo-27513: email.utils.getaddresses() now handles Header objects (#13797)
getaddresses() should be able to handle a Header object if passed one. Co-authored-by: Ɓukasz Langa <lukasz@langa.pl>
Diffstat (limited to 'Lib/email')
-rw-r--r--Lib/email/utils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/email/utils.py b/Lib/email/utils.py
index a8e46a7..cfdfeb3 100644
--- a/Lib/email/utils.py
+++ b/Lib/email/utils.py
@@ -109,7 +109,7 @@ def formataddr(pair, charset='utf-8'):
def getaddresses(fieldvalues):
"""Return a list of (REALNAME, EMAIL) for each fieldvalue."""
- all = COMMASPACE.join(fieldvalues)
+ all = COMMASPACE.join(str(v) for v in fieldvalues)
a = _AddressList(all)
return a.addresslist