mirror of
https://github.com/python/cpython.git
synced 2025-10-10 00:43:41 +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:
parent
fef952a607
commit
ea2b490f3d
4 changed files with 11 additions and 5 deletions
|
@ -245,7 +245,7 @@ def b32decode(s, casefold=False, map01=None):
|
|||
for c in s:
|
||||
val = _b32rev.get(c)
|
||||
if val is None:
|
||||
raise TypeError('Non-base32 digit found')
|
||||
raise binascii.Error('Non-base32 digit found')
|
||||
acc += _b32rev[c] << shift
|
||||
shift -= 5
|
||||
if shift < 0:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue