_encode_chunks(): Throw out empty chunks.

This commit is contained in:
Barry Warsaw 2003-03-17 20:36:20 +00:00
parent 240754933e
commit 6613fb8412

View file

@ -361,6 +361,8 @@ class Header:
# =?charset2?b?SvxyZ2VuIEL2aW5n?=" # =?charset2?b?SvxyZ2VuIEL2aW5n?="
chunks = [] chunks = []
for header, charset in newchunks: for header, charset in newchunks:
if not header:
continue
if charset is None or charset.header_encoding is None: if charset is None or charset.header_encoding is None:
s = header s = header
else: else: