2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-29 05:03:34 +08:00

pc_rpc/Server: show builtin terminate in method list

This commit is contained in:
Sebastien Bourdeauducq 2015-08-17 23:03:43 +08:00
parent 2410ef79e5
commit 21b170ed32

View File

@ -454,6 +454,17 @@ class Server(_AsyncioServer):
argspec = inspect.getfullargspec(method)
doc["methods"][name] = (dict(argspec.__dict__),
inspect.getdoc(method))
if self.builtin_terminate:
doc["methods"]["terminate"] = (
{
"args": ["self"],
"defaults": None,
"varargs": None,
"varkw": None,
"kwonlyargs": [],
"kwonlydefaults": [],
},
"Terminate the server.")
obj = {"status": "ok", "ret": doc}
elif obj["action"] == "call":
logger.debug("calling %s", _PrettyPrintCall(obj))