Commit dbdc4399 authored by Robin Sonnabend's avatar Robin Sonnabend
Browse files

Catch JSONDecodeError in

Fix #193
parent 5f051d53
import requests
from json import JSONDecodeError
import config
......@@ -117,7 +118,10 @@ class WikiClient:
"HTTP status code {} on action {}.".format(
req.status_code, action))
return req.json()
return req.json()
except JSONDecodeError:
raise WikiException("Server did not return valid JSON.")
def main():
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment