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
1 changed files with 11 additions and 0 deletions

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))