From 2f3a8f2a323b66ca46f3b8564449d26d7f75169f Mon Sep 17 00:00:00 2001 From: David Wilson Date: Sat, 5 Jan 2019 20:12:01 +0000 Subject: [PATCH] parent: proxy_connect docstring. --- mitogen/parent.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/mitogen/parent.py b/mitogen/parent.py index 394b449b..4755a832 100644 --- a/mitogen/parent.py +++ b/mitogen/parent.py @@ -604,7 +604,20 @@ def stream_by_method_name(name): @mitogen.core.takes_econtext def _proxy_connect(name, method_name, kwargs, econtext): + """ + Implements the target portion of Router._proxy_connect() by upgrading the + local context to a parent if it was not already, then calling back into + Router._connect() using the arguments passed to the parent's + Router.connect(). + + :returns: + Dict containing: + * ``id``: :data:`None`, or integer new context ID. + * ``name``: :data:`None`, or string name attribute of new Context. + * ``msg``: :data:`None`, or StreamError exception text. + """ upgrade_router(econtext) + try: context = econtext.router._connect( klass=stream_by_method_name(method_name),