From 78392962cb594ae47636de78a4b01f4e798b6e2e Mon Sep 17 00:00:00 2001 From: David Wilson Date: Sat, 9 Sep 2017 02:15:26 +0530 Subject: [PATCH] Copy context name to stream name if specified. --- econtext/master.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/econtext/master.py b/econtext/master.py index 82184f16..54cadbf3 100644 --- a/econtext/master.py +++ b/econtext/master.py @@ -569,8 +569,10 @@ class Router(econtext.core.Router): def _connect(self, context_id, klass, name=None, **kwargs): context = Context(self, context_id) stream = klass(self, context.context_id, context.key, **kwargs) + if name is not None: + stream.name = name stream.connect() - context.name = name or stream.name + context.name = stream.name self.register(context, stream) return context