Skip to content

Commit 7993070

Browse files
committed
Raise ImportError on spec failure
1 parent 330b4d5 commit 7993070

File tree

1 file changed

+2
-0
lines changed
  • src/torchcodec/decoders/_core

1 file changed

+2
-0
lines changed

src/torchcodec/decoders/_core/ops.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ def load_torchcodec_extension():
4444
pybind_ops_module_name,
4545
_get_extension_path(pybind_ops_library_name),
4646
)
47+
if spec is None:
48+
raise ImportError("Unable to load spec for pybind_ops")
4749

4850
global _pybind_ops
4951
_pybind_ops = importlib.util.module_from_spec(spec)

0 commit comments

Comments
 (0)