diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2013-01-02 22:03:02 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2013-01-02 22:03:02 +0100 |
commit | a786fef06639da439f9edd367db36388dc1c2658 (patch) | |
tree | 84b7d7acf23c300bef4b0fd5ee744e408ffc1152 /module/remote/JSONClient.py | |
parent | New naming: pyLoadCore -> pyload (diff) | |
download | pyload-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.py | 2 |
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: |