forked from M-Labs/artiq
pc_rpc/Server: show builtin terminate in method list
This commit is contained in:
parent
2410ef79e5
commit
21b170ed32
|
@ -454,6 +454,17 @@ class Server(_AsyncioServer):
|
||||||
argspec = inspect.getfullargspec(method)
|
argspec = inspect.getfullargspec(method)
|
||||||
doc["methods"][name] = (dict(argspec.__dict__),
|
doc["methods"][name] = (dict(argspec.__dict__),
|
||||||
inspect.getdoc(method))
|
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}
|
obj = {"status": "ok", "ret": doc}
|
||||||
elif obj["action"] == "call":
|
elif obj["action"] == "call":
|
||||||
logger.debug("calling %s", _PrettyPrintCall(obj))
|
logger.debug("calling %s", _PrettyPrintCall(obj))
|
||||||
|
|
Loading…
Reference in New Issue