mirror of
https://github.com/jupyter/notebook.git
synced 2025-03-13 13:17:50 +08:00
handle setting Widget.comm = None
which is done in `Widget.close` fixes loads of warnings in widget test output, caused every time a widget is closed.
This commit is contained in:
parent
287d572fb3
commit
b5e7ce30ca
@ -175,7 +175,8 @@ class Widget(LoggingConfigurable):
|
||||
|
||||
def _comm_changed(self, name, new):
|
||||
"""Called when the comm is changed."""
|
||||
self.comm = new
|
||||
if new is None:
|
||||
return
|
||||
self._model_id = self.model_id
|
||||
|
||||
self.comm.on_msg(self._handle_msg)
|
||||
|
Loading…
x
Reference in New Issue
Block a user