Skip to content

Commit c7d9df3

Browse files
committed
Manual exception raising
1 parent ffdbbfb commit c7d9df3

File tree

1 file changed

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

1 file changed

+2
-1
lines changed

src/torchcodec/decoders/_core/ops.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ def load_torchcodec_extension():
4444
pybind_ops_module_name,
4545
_get_extension_path(pybind_ops_library_name),
4646
)
47-
assert spec is not None
47+
if spec is None:
48+
raise RuntimeError("spec is None")
4849

4950
global _pybind_ops
5051
_pybind_ops = importlib.util.module_from_spec(spec)

0 commit comments

Comments
 (0)