summaryrefslogtreecommitdiffstats
path: root/Lib/email
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/email')
-rw-r--r--Lib/email/_policybase.py4
-rw-r--r--Lib/email/policy.py4
2 files changed, 4 insertions, 4 deletions
diff --git a/Lib/email/_policybase.py b/Lib/email/_policybase.py
index c7694a4..4b63b97 100644
--- a/Lib/email/_policybase.py
+++ b/Lib/email/_policybase.py
@@ -302,12 +302,12 @@ class Compat32(Policy):
"""+
The name is parsed as everything up to the ':' and returned unmodified.
The value is determined by stripping leading whitespace off the
- remainder of the first line, joining all subsequent lines together, and
+ remainder of the first line joined with all subsequent lines, and
stripping any trailing carriage return or linefeed characters.
"""
name, value = sourcelines[0].split(':', 1)
- value = value.lstrip(' \t') + ''.join(sourcelines[1:])
+ value = ''.join((value, *sourcelines[1:])).lstrip(' \t\r\n')
return (name, value.rstrip('\r\n'))
def header_store_parse(self, name, value):
diff --git a/Lib/email/policy.py b/Lib/email/policy.py
index 46b7de5..6e109b6 100644
--- a/Lib/email/policy.py
+++ b/Lib/email/policy.py
@@ -119,13 +119,13 @@ class EmailPolicy(Policy):
"""+
The name is parsed as everything up to the ':' and returned unmodified.
The value is determined by stripping leading whitespace off the
- remainder of the first line, joining all subsequent lines together, and
+ remainder of the first line joined with all subsequent lines, and
stripping any trailing carriage return or linefeed characters. (This
is the same as Compat32).
"""
name, value = sourcelines[0].split(':', 1)
- value = value.lstrip(' \t') + ''.join(sourcelines[1:])
+ value = ''.join((value, *sourcelines[1:])).lstrip(' \t\r\n')
return (name, value.rstrip('\r\n'))
def header_store_parse(self, name, value):