Skip to content

Commit

Permalink
Backport PR jupyter-widgets#3737: Fix kernel attribute check
Browse files Browse the repository at this point in the history
  • Loading branch information
martinRenou committed Mar 27, 2023
1 parent 560e43a commit c9b4f20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ipywidgets/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
def get_comm_manager():
ip = get_ipython()

if ip is not None and ip.kernel is not None:
if ip is not None and getattr(ip, "kernel", None) is not None:
return get_ipython().kernel.comm_manager

from ._version import version_info, __version__, __protocol_version__, __jupyter_widgets_controls_version__, __jupyter_widgets_base_version__
Expand Down

0 comments on commit c9b4f20

Please sign in to comment.