diff --git a/mitogen/core.py b/mitogen/core.py index e369a48a..6bda7f84 100644 --- a/mitogen/core.py +++ b/mitogen/core.py @@ -314,6 +314,7 @@ class Message(object): self.src_id = mitogen.context_id self.auth_id = mitogen.context_id vars(self).update(kwargs) + assert isinstance(self.data, str) def _unpickle_context(self, context_id, name): return _unpickle_context(self.router, context_id, name) diff --git a/mitogen/parent.py b/mitogen/parent.py index 1b54cccc..03373bbc 100644 --- a/mitogen/parent.py +++ b/mitogen/parent.py @@ -675,7 +675,7 @@ class RouteMonitor(object): data = str(target_id) if name: - data = '%s:%s' % (target_id, name) + data = '%s:%s' % (target_id, mitogen.core.b(name)) self.parent.send( mitogen.core.Message( handle=handle,