Skip to content

Commit 83e1c9d

Browse files
committed
add comm_manager check
1 parent 93a848b commit 83e1c9d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

python/ipywidgets/ipywidgets/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ def load_ipython_extension(ip):
4545
def register_comm_target(kernel=None):
4646
"""Register the jupyter.widget comm target"""
4747
comm_manager = get_comm_manager()
48-
48+
if comm_manager is None:
49+
return
4950
comm_manager.register_target('jupyter.widget', Widget.handle_comm_opened)
5051
comm_manager.register_target('jupyter.widget.control', Widget.handle_control_comm_opened)
5152

0 commit comments

Comments
 (0)