summaryrefslogtreecommitdiffstats
path: root/module/remote/JSONClient.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-01-02 22:03:02 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-01-02 22:03:02 +0100
commita786fef06639da439f9edd367db36388dc1c2658 (patch)
tree84b7d7acf23c300bef4b0fd5ee744e408ffc1152 /module/remote/JSONClient.py
parentNew naming: pyLoadCore -> pyload (diff)
downloadpyload-a786fef06639da439f9edd367db36388dc1c2658.tar.xz
little cleanup, improved handling of custom exceptions via api
Diffstat (limited to 'module/remote/JSONClient.py')
-rw-r--r--module/remote/JSONClient.py2
1 files changed, 2 insertions, 0 deletions
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: