We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 70f5276 commit 5629268Copy full SHA for 5629268
1 file changed
Lib/base64.py
@@ -58,8 +58,8 @@ def b64encode(s, altchars=None):
58
encoded = binascii.b2a_base64(s)[:-1]
59
if altchars is not None:
60
if not isinstance(altchars, bytes_types):
61
- altchars = TypeError("expected bytes, not %s"
62
- % altchars.__class__.__name__)
+ raise TypeError("expected bytes, not %s"
+ % altchars.__class__.__name__)
63
assert len(altchars) == 2, repr(altchars)
64
return _translate(encoded, {'+': altchars[0:1], '/': altchars[1:2]})
65
return encoded
0 commit comments