Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Lib/email/base64mime.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def body_encode(s, maxlinelen=76, eol=NL):
in an email.
"""
if not s:
return s
return ""

encvec = []
max_unencoded = maxlinelen * 3 // 4
Expand Down
3 changes: 1 addition & 2 deletions Lib/test/test_email/test_email.py
Original file line number Diff line number Diff line change
Expand Up @@ -4261,7 +4261,7 @@ def test_decode(self):

def test_encode(self):
eq = self.assertEqual
eq(base64mime.body_encode(b''), b'')
eq(base64mime.body_encode(b''), '')
eq(base64mime.body_encode(b'hello'), 'aGVsbG8=\n')
# Test the binary flag
eq(base64mime.body_encode(b'hello\n'), 'aGVsbG8K\n')
Expand Down Expand Up @@ -4292,7 +4292,6 @@ def test_header_encode(self):
eq(he('hello\nworld'), '=?iso-8859-1?b?aGVsbG8Kd29ybGQ=?=')



class TestQuopri(unittest.TestCase):
def setUp(self):
# Set of characters (as byte integers) that don't need to be encoded
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Return empty string if base64mime.body_encode receive empty bytes