Skip to content

Commit 3192ea8

Browse files
Merge pull request #3995 from nvaytet/catch_import_error
Catch ImportError instead of Exception for FigureWidget
2 parents 88a4dfb + 932ea4c commit 3192ea8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/python/plotly/plotly/graph_objects/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@
273273
from ..graph_objs._figurewidget import FigureWidget
274274
else:
275275
raise ImportError()
276-
except Exception:
276+
except ImportError:
277277
from ..missing_ipywidgets import FigureWidget
278278
else:
279279
__all__.append("FigureWidget")
@@ -291,7 +291,7 @@ def __getattr__(import_name):
291291
return FigureWidget
292292
else:
293293
raise ImportError()
294-
except Exception:
294+
except ImportError:
295295
from ..missing_ipywidgets import FigureWidget
296296

297297
return FigureWidget

0 commit comments

Comments
 (0)