##// END OF EJS Templates
Fixing display publisher (Python 2)
Henry Fredrick Schreiner -
Show More
@@ -121,11 +121,18 b' class CapturingDisplayPublisher(DisplayPublisher):'
121 """A DisplayPublisher that stores"""
121 """A DisplayPublisher that stores"""
122 outputs = List()
122 outputs = List()
123
123
124 def publish(self, data, metadata=None, source=None):
124 def publish(self, data, metadata=None, source=None, **kwargs):
125
126 # These are kwargs only on Python 3, not used there.
127 # For consistency and avoid code divergence we leave them here to
128 # simplify potential backport
129 transient = kwargs.pop('transient', None)
130 update = kwargs.pop('update', False)
131
125 self.outputs.append((data, metadata))
132 self.outputs.append((data, metadata))
126
133
127 def clear_output(self, wait=False):
134 def clear_output(self, wait=False):
128 super(CapturingDisplayPublisher, self).clear_output(wait)
135 super(CapturingDisplayPublisher, self).clear_output(wait)
129
136
130 # empty the list, *do not* reassign a new list
137 # empty the list, *do not* reassign a new list
131 del self.outputs[:]
138 del self.outputs[:]
General Comments 0
You need to be logged in to leave comments. Login now