forked from M-Labs/artiq
pc_rpc: raise RemoteError on non-existing method RPC attempt
This commit is contained in:
parent
489bcb3447
commit
ee225d5f0d
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user