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