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:
Serhiy Storchaka 2013-05-28 15:27:29 +03:00
parent fef952a607
commit ea2b490f3d
4 changed files with 11 additions and 5 deletions

View file

@ -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: