mirror of
https://github.com/certbot/certbot.git
synced 2026-08-04 12:32:02 +02:00
More complete list of exceptions that can be raised
The acme.acme_object_validate() function can also raise ValueError when given something that isn't JSON.
This commit is contained in:
@@ -28,7 +28,8 @@ def acme_object_validate(j):
|
|||||||
|
|
||||||
Success will return None; failure to validate will raise a
|
Success will return None; failure to validate will raise a
|
||||||
jsonschema.ValidationError exception describing the reason that the
|
jsonschema.ValidationError exception describing the reason that the
|
||||||
object could not be validated successfully.
|
object could not be validated successfully, or a ValueError exception
|
||||||
|
if the object cannot even be parsed as valid JSON.
|
||||||
"""
|
"""
|
||||||
j = json.loads(j)
|
j = json.loads(j)
|
||||||
if not isinstance(j, dict):
|
if not isinstance(j, dict):
|
||||||
|
|||||||
Reference in New Issue
Block a user