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/WSClient.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'module/remote/WSClient.py') diff --git a/module/remote/WSClient.py b/module/remote/WSClient.py index 23b5fc3ca..fc7590edb 100644 --- a/module/remote/WSClient.py +++ b/module/remote/WSClient.py @@ -34,6 +34,8 @@ class WSClient: self.ws.send(dumps([func, args])) code, result = loads(self.ws.recv()) + if code == 400: + raise result if code == 404: raise AttributeError("Unknown Method") elif code == 500: -- cgit v1.2.3