mirror of
https://github.com/python/cpython.git
synced 2025-08-22 09:45:06 +00:00
Issue #18011: base64.b32decode() now raises a binascii.Error if there are
non-alphabet characters present in the input string to conform a docstring. Updated the module documentation.
This commit is contained in:
commit
77a3ad743f
4 changed files with 11 additions and 5 deletions
|
@ -222,7 +222,7 @@ def b32decode(s, casefold=False, map01=None):
|
|||
for c in quanta:
|
||||
acc = (acc << 5) + b32rev[c]
|
||||
except KeyError:
|
||||
raise TypeError('Non-base32 digit found')
|
||||
raise binascii.Error('Non-base32 digit found')
|
||||
decoded += acc.to_bytes(5, 'big')
|
||||
# Process the last, partial quanta
|
||||
if padchars:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue