diff --git a/contrib/client.py b/contrib/client.py index 74e74fe..5c561f2 100644 --- a/contrib/client.py +++ b/contrib/client.py @@ -17,7 +17,10 @@ class Client: msg = json.dumps(requests) + '\n' self.s.sendall(msg.encode('ascii')) response = json.loads(self.f.readline()) - return [r['result'] for r in response] + try: + return [r['result'] for r in response] + except KeyError: + raise ValueError(response) def request(method, *args):