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:
Seth Schoen
2014-11-22 17:36:10 -08:00
parent 2cf5fbab3b
commit faaf101f08
+2 -1
View File
@@ -28,7 +28,8 @@ def acme_object_validate(j):
Success will return None; failure to validate will raise a
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)
if not isinstance(j, dict):