]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
backport loewis' checkin of
authorMichael W. Hudson <mwh@python.net>
Mon, 25 Feb 2002 10:52:43 +0000 (10:52 +0000)
committerMichael W. Hudson <mwh@python.net>
Mon, 25 Feb 2002 10:52:43 +0000 (10:52 +0000)
    revision 1.48 of smtplib.py

Accept Unicode strings as SMTP TO addresses. Fixes #521270.
2.2.1 candidate.

Lib/smtplib.py

index f024bffc1f56224dad5bd5235a3ed0eb3bbeb555..079f128cc5885c1c34370ded3d65dbcb14305864 100755 (executable)
@@ -636,7 +636,7 @@ class SMTP:
             self.rset()
             raise SMTPSenderRefused(code, resp, from_addr)
         senderrs={}
-        if type(to_addrs) == types.StringType:
+        if isinstance(to_addrs, types.StringTypes):
             to_addrs = [to_addrs]
         for each in to_addrs:
             (code,resp)=self.rcpt(each, rcpt_options)