pc_rpc: raise RemoteError on non-existing method RPC attempt

This commit is contained in:
Sebastien Bourdeauducq 2014-10-25 17:25:17 +08:00
parent 489bcb3447
commit ee225d5f0d

View File

@ -77,8 +77,8 @@ class Server:
obj = pyon.decode(line.decode())
action = obj["action"]
if action == "call":
method = getattr(self.target, obj["name"])
try:
method = getattr(self.target, obj["name"])
ret = method(*obj["args"], **obj["kwargs"])
obj = {"result": "ok", "ret": ret}
except Exception as e: