rpc: fix indentation of class docstring

This commit is contained in:
Sebastien Bourdeauducq 2015-06-23 19:31:52 +00:00
parent 71721a152e
commit 4ba8951ae1
2 changed files with 2 additions and 1 deletions

View File

@ -39,6 +39,7 @@ def list_methods(remote):
doc = remote.get_rpc_method_list() doc = remote.get_rpc_method_list()
if doc["docstring"] is not None: if doc["docstring"] is not None:
print(doc["docstring"]) print(doc["docstring"])
print()
for name, (argspec, docstring) in sorted(doc["methods"].items()): for name, (argspec, docstring) in sorted(doc["methods"].items()):
args = "" args = ""
for arg in argspec["args"]: for arg in argspec["args"]:

View File

@ -443,7 +443,7 @@ class Server(_AsyncioServer):
if obj["action"] == "get_rpc_method_list": if obj["action"] == "get_rpc_method_list":
members = inspect.getmembers(target, inspect.ismethod) members = inspect.getmembers(target, inspect.ismethod)
doc = { doc = {
"docstring": target.__doc__, "docstring": inspect.getdoc(target),
"methods": {} "methods": {}
} }
for name, method in members: for name, method in members: