From 21b170ed32d73c729fa5a570e8a1573dcccaa303 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Mon, 17 Aug 2015 23:03:43 +0800 Subject: [PATCH] pc_rpc/Server: show builtin terminate in method list --- artiq/protocols/pc_rpc.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/artiq/protocols/pc_rpc.py b/artiq/protocols/pc_rpc.py index d99c62803..f001d3a26 100644 --- a/artiq/protocols/pc_rpc.py +++ b/artiq/protocols/pc_rpc.py @@ -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))