mirror of https://github.com/m-labs/artiq.git
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())
|
obj = pyon.decode(line.decode())
|
||||||
action = obj["action"]
|
action = obj["action"]
|
||||||
if action == "call":
|
if action == "call":
|
||||||
method = getattr(self.target, obj["name"])
|
|
||||||
try:
|
try:
|
||||||
|
method = getattr(self.target, obj["name"])
|
||||||
ret = method(*obj["args"], **obj["kwargs"])
|
ret = method(*obj["args"], **obj["kwargs"])
|
||||||
obj = {"result": "ok", "ret": ret}
|
obj = {"result": "ok", "ret": ret}
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|
Loading…
Reference in New Issue