summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
Diffstat (limited to 'Lib')
-rw-r--r--Lib/email/base64mime.py2
-rw-r--r--Lib/test/test_email/test_email.py3
2 files changed, 2 insertions, 3 deletions
diff --git a/Lib/email/base64mime.py b/Lib/email/base64mime.py
index 17f0818..a7cc373 100644
--- a/Lib/email/base64mime.py
+++ b/Lib/email/base64mime.py
@@ -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
diff --git a/Lib/test/test_email/test_email.py b/Lib/test/test_email/test_email.py
index 044b938..720a63b 100644
--- a/Lib/test/test_email/test_email.py
+++ b/Lib/test/test_email/test_email.py
@@ -4261,7 +4261,7 @@ class TestBase64(unittest.TestCase):
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')
@@ -4292,7 +4292,6 @@ eHh4eCB4eHh4IA==\r
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