summaryrefslogtreecommitdiff
path: root/Lib/base64.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-11-12 19:47:38 +0200
committerSerhiy Storchaka <storchaka@gmail.com>2015-11-12 19:47:38 +0200
commit1e8528022c0d57004d5e45f69761bfce2cda5573 (patch)
treef734f46424bc122530a852abb6fbb2f27c089761 /Lib/base64.py
parent7006c33c21ba0db56f80b9236e6c6b373e479ed2 (diff)
parentd9f3a4fea570a035b5767518abca56a6d529a4a4 (diff)
downloadcpython-1e8528022c0d57004d5e45f69761bfce2cda5573.tar.gz
Issue #25607: Restore old distutils logging threshold after running tests that
parse command line arguments.
Diffstat (limited to 'Lib/base64.py')
-rwxr-xr-xLib/base64.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/base64.py b/Lib/base64.py
index 640f787c73..eb925cd4c5 100755
--- a/Lib/base64.py
+++ b/Lib/base64.py
@@ -58,8 +58,7 @@ def b64encode(s, altchars=None):
The encoded byte string is returned.
"""
- # Strip off the trailing newline
- encoded = binascii.b2a_base64(s)[:-1]
+ encoded = binascii.b2a_base64(s, newline=False)
if altchars is not None:
assert len(altchars) == 2, repr(altchars)
return encoded.translate(bytes.maketrans(b'+/', altchars))