From 45664d3bef22ba545a53102445ea8e155ca4dac7 Mon Sep 17 00:00:00 2001 From: Trevor Manz Date: Wed, 20 Nov 2024 18:10:36 -0500 Subject: [PATCH] remove try catch --- gosling/_widget.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gosling/_widget.py b/gosling/_widget.py index e942c29..26bb848 100644 --- a/gosling/_widget.py +++ b/gosling/_widget.py @@ -6,10 +6,10 @@ import anywidget import traitlets as t -try: - _esm = pathlib.Path(__file__).parent / "static" / "widget.js" -except FileNotFoundError: - warnings.warn("GoslingWidget: ESM not found. Must build frontend assets.") +_esm = pathlib.Path(__file__).parent / "static" / "widget.js" + +if not _esm.exists(): + warnings.warn("Widget front-end code not found. Assuming running in CI.") _esm = None