##// END OF EJS Templates
Revert "Add a metadata attribute to zeromq stdout/stderr stream messages"...
Jason Grout -
Show More
@@ -28,15 +28,10 class OutStream(object):
28 self.name = name
28 self.name = name
29 self.parent_header = {}
29 self.parent_header = {}
30 self._new_buffer()
30 self._new_buffer()
31 self.metadata = {}
32
31
33 def set_parent(self, parent):
32 def set_parent(self, parent):
34 self.parent_header = extract_header(parent)
33 self.parent_header = extract_header(parent)
35
34
36 def set_metadata(self, metadata):
37 self.flush()
38 self.metadata = metadata
39
40 def close(self):
35 def close(self):
41 self.pub_socket = None
36 self.pub_socket = None
42
37
@@ -48,8 +43,6 class OutStream(object):
48 data = self._buffer.getvalue()
43 data = self._buffer.getvalue()
49 if data:
44 if data:
50 content = {u'name':self.name, u'data':data}
45 content = {u'name':self.name, u'data':data}
51 if self.metadata:
52 content['metadata'] = self.metadata
53 msg = self.session.send(self.pub_socket, u'stream', content=content,
46 msg = self.session.send(self.pub_socket, u'stream', content=content,
54 parent=self.parent_header, ident=self.topic)
47 parent=self.parent_header, ident=self.topic)
55
48
General Comments 0
You need to be logged in to leave comments. Login now