[Python-checkins] cpython (3.5): Issues #23147, #23148: Presumably fixed bugs in folding UnstructuredTokenList.

serhiy.storchaka python-checkins at python.org
Sun Jul 17 06:26:30 EDT 2016


https://hg.python.org/cpython/rev/efd4ffa88173
changeset:   102380:efd4ffa88173
branch:      3.5
parent:      102378:c88ec1bb67d0
user:        Serhiy Storchaka <storchaka at gmail.com>
date:        Sun Jul 17 13:25:15 2016 +0300
summary:
  Issues #23147, #23148: Presumably fixed bugs in folding UnstructuredTokenList.

files:
  Lib/email/_header_value_parser.py |  4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)


diff --git a/Lib/email/_header_value_parser.py b/Lib/email/_header_value_parser.py
--- a/Lib/email/_header_value_parser.py
+++ b/Lib/email/_header_value_parser.py
@@ -439,7 +439,7 @@
                 if folded.append_if_fits(part):
                     continue
             if part.has_fws:
-                part.fold(folded)
+                part._fold(folded)
                 continue
             # It can't be split...we just have to put it on its own line.
             folded.append(tstr)
@@ -460,7 +460,7 @@
                     last_ew = len(res)
                 else:
                     tl = get_unstructured(''.join(res[last_ew:] + [spart]))
-                    res.append(tl.as_encoded_word())
+                    res.append(tl.as_encoded_word(charset))
         return ''.join(res)
 
 

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list