summaryrefslogtreecommitdiff
diff options
-rwxr-xr-xbin/camera_test.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/bin/camera_test.py b/bin/camera_test.py
index 37e97d9..a7740f4 100755
--- a/bin/camera_test.py
+++ b/bin/camera_test.py
@@ -248,6 +248,8 @@ class CameraTest:
supported_resolutions[key] = set()
supported_resolutions[key].add(
caps.get_structure(i).get_int('height').value)
+ if not supported_resolutions:
+ raise SystemExit("No supported resolutions found!")
width = min(supported_resolutions.keys(),
key=lambda x: abs(x - self._width))
height = min(supported_resolutions[width],