From a786fef06639da439f9edd367db36388dc1c2658 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Wed, 2 Jan 2013 22:03:02 +0100 Subject: little cleanup, improved handling of custom exceptions via api --- module/remote/JSONClient.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'module/remote/JSONClient.py') diff --git a/module/remote/JSONClient.py b/module/remote/JSONClient.py index 9f678f5bd..469d40317 100644 --- a/module/remote/JSONClient.py +++ b/module/remote/JSONClient.py @@ -16,6 +16,8 @@ class JSONClient: def request(self, path, data): ret = urlopen(self.url + path, urlencode(data)) + if ret.code == 400: + raise loads(ret.read()) if ret.code == 404: raise AttributeError("Unknown Method") if ret.code == 500: -- cgit v1.2.3