mirror of
https://github.com/certbot/certbot.git
synced 2026-07-27 08:09:10 +02:00
Human meaningful exception message for decoding fields with minimum length.
This commit is contained in:
@@ -326,7 +326,8 @@ def decode_b64jose(data, size=None, minimum=False):
|
||||
|
||||
if size is not None and ((not minimum and len(decoded) != size)
|
||||
or (minimum and len(decoded) < size)):
|
||||
raise errors.DeserializationError()
|
||||
raise errors.DeserializationError(
|
||||
"Expected at least or exactly {0} bytes".format(size))
|
||||
|
||||
return decoded
|
||||
|
||||
|
||||
Reference in New Issue
Block a user