Commit 7e3a30f
committed
fix(dataloader): use specific exception, add cv2 availability check
P2: replace bare except with except Exception
- bare except catches KeyboardInterrupt/SystemExit unexpectedly
- now allows interrupt signals to propagate
P2: add _HAS_CV2 check before using cv2
- _HAS_CV2 was defined but never checked
- added ImportError with clear message in _mv_energy_norm1 parent 1a718c2 commit 7e3a30f
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
| 59 | + | |
58 | 60 | | |
59 | 61 | | |
60 | 62 | | |
| |||
315 | 317 | | |
316 | 318 | | |
317 | 319 | | |
318 | | - | |
| 320 | + | |
319 | 321 | | |
320 | 322 | | |
321 | 323 | | |
| |||
0 commit comments