Skip to content
Snippets Groups Projects
Commit 72fc1e99 authored by inso's avatar inso
Browse files

Fix duniter version

parent a08ecaf4
Branches
Tags
No related merge requests found
......@@ -122,7 +122,7 @@ class API(object):
data = json.loads(text)
jsonschema.validate(data, self.schema)
return data
except TypeError:
except (TypeError, json.decoder.JSONDecodeError):
raise jsonschema.ValidationError("Could not parse json")
def parse_error(self, text):
......@@ -150,7 +150,7 @@ class API(object):
data = await response.json()
jsonschema.validate(data, self.schema)
return data
except TypeError:
except (TypeError, json.decoder.JSONDecodeError):
raise jsonschema.ValidationError("Could not parse json")
async def requests_get(self, session, path, **kwargs):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment