Skip to content

Commit 2d1e307

Browse files
author
SzabolcsGergely
committed
Change RuntimeError to FileNotFoundError
1 parent 86bc519 commit 2d1e307

14 files changed

+14
-14
lines changed

examples/08_rgb_mobilenet.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
args = parser.parse_args()
1515

1616
if not Path(nnPathDefault).exists():
17-
raise RuntimeError("Required file/s not found, please run 'python3 install_requirements.py'")
17+
raise FileNotFoundError("Required file/s not found, please run 'python3 install_requirements.py'")
1818

1919
# Start defining a pipeline
2020
pipeline = dai.Pipeline()

examples/09_mono_mobilenet.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
nnPath = sys.argv[1]
1313

1414
if not Path(nnPath).exists():
15-
raise RuntimeError("Required file/s not found, please run 'python3 install_requirements.py'")
15+
raise FileNotFoundError("Required file/s not found, please run 'python3 install_requirements.py'")
1616

1717
# Start defining a pipeline
1818
pipeline = dai.Pipeline()

examples/10_mono_depth_mobilenetssd.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
nnPath = sys.argv[1]
1313

1414
if not Path(nnPath).exists():
15-
raise RuntimeError("Required file/s not found, please run 'python3 install_requirements.py'")
15+
raise FileNotFoundError("Required file/s not found, please run 'python3 install_requirements.py'")
1616

1717
# Start defining a pipeline
1818
pipeline = dai.Pipeline()

examples/11_rgb_encoding_mono_mobilenet.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
nnPath = sys.argv[1]
1313

1414
if not Path(nnPath).exists():
15-
raise RuntimeError("Required file/s not found, please run 'python3 install_requirements.py'")
15+
raise FileNotFoundError("Required file/s not found, please run 'python3 install_requirements.py'")
1616

1717
pipeline = dai.Pipeline()
1818

examples/12_rgb_encoding_mono_mobilenet_depth.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
nnPath = sys.argv[1]
1313

1414
if not Path(nnPath).exists():
15-
raise RuntimeError("Required file/s not found, please run 'python3 install_requirements.py'")
15+
raise FileNotFoundError("Required file/s not found, please run 'python3 install_requirements.py'")
1616

1717
pipeline = dai.Pipeline()
1818

examples/15_rgb_mobilenet_4k.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
nnPath = sys.argv[1]
1313

1414
if not Path(nnPath).exists():
15-
raise RuntimeError("Required file/s not found, please run 'python3 install_requirements.py'")
15+
raise FileNotFoundError("Required file/s not found, please run 'python3 install_requirements.py'")
1616

1717
# Start defining a pipeline
1818
pipeline = dai.Pipeline()

examples/17_video_mobilenet.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
videoPath = sys.argv[2]
1717

1818
if not Path(nnPath).exists() or not Path(videoPath).exists():
19-
raise RuntimeError("Required file/s not found, please run 'python3 install_requirements.py'")
19+
raise FileNotFoundError("Required file/s not found, please run 'python3 install_requirements.py'")
2020

2121
# Start defining a pipeline
2222
pipeline = dai.Pipeline()

examples/18_rgb_encoding_mobilenet.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
nnPath = sys.argv[1]
1313

1414
if not Path(nnPath).exists():
15-
raise RuntimeError("Required file/s not found, please run 'python3 install_requirements.py'")
15+
raise FileNotFoundError("Required file/s not found, please run 'python3 install_requirements.py'")
1616

1717
pipeline = dai.Pipeline()
1818

examples/22_1_tiny_yolo_v3_device_side_decoding.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
nnPath = sys.argv[1]
4040

4141
if not Path(nnPath).exists():
42-
raise RuntimeError("Required file/s not found, please run 'python3 install_requirements.py'")
42+
raise FileNotFoundError("Required file/s not found, please run 'python3 install_requirements.py'")
4343

4444
# Start defining a pipeline
4545
pipeline = dai.Pipeline()

examples/22_2_tiny_yolo_v4_device_side_decoding.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
nnPath = sys.argv[1]
3939

4040
if not Path(nnPath).exists():
41-
raise RuntimeError("Required file/s not found, please run 'python3 install_requirements.py'")
41+
raise FileNotFoundError("Required file/s not found, please run 'python3 install_requirements.py'")
4242

4343
# Start defining a pipeline
4444
pipeline = dai.Pipeline()

0 commit comments

Comments
 (0)