summaryrefslogtreecommitdiffstats
path: root/Lib/email/header.py
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2011-03-16 22:26:23 (GMT)
committerR David Murray <rdmurray@bitdance.com>2011-03-16 22:26:23 (GMT)
commitde91276a5c90b9d3e42866054e48d255a37981b3 (patch)
tree31656289206bf4558578ef3d6c0791282330e419 /Lib/email/header.py
parent6d94bd470e3f4aa1dc7295b034553509ace2c654 (diff)
downloadcpython-de91276a5c90b9d3e42866054e48d255a37981b3.zip
cpython-de91276a5c90b9d3e42866054e48d255a37981b3.tar.gz
cpython-de91276a5c90b9d3e42866054e48d255a37981b3.tar.bz2
#11401: handle headers with no value.
Diffstat (limited to 'Lib/email/header.py')
-rw-r--r--Lib/email/header.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/email/header.py b/Lib/email/header.py
index 43220df..da739d5 100644
--- a/Lib/email/header.py
+++ b/Lib/email/header.py
@@ -304,7 +304,7 @@ class Header:
self._continuation_ws, splitchars)
for string, charset in self._chunks:
lines = string.splitlines()
- formatter.feed(lines[0], charset)
+ formatter.feed(lines[0] if lines else '', charset)
for line in lines[1:]:
formatter.newline()
if charset.header_encoding is not None: