summaryrefslogtreecommitdiff
diff options
authorZygmunt Krynicki <zygmunt.krynicki@canonical.com>2014-06-17 16:10:34 +0200
committerZygmunt Krynicki <zygmunt.krynicki@canonical.com>2014-06-17 16:10:34 +0200
commit2a35e07ac20314fb2d97f7e662ce38284f276cc4 (patch)
treeeb667ab5577571be9f0f9638b118c39fff20bf76
parent6fd768729920e4221f4d0815f598fb510acd2de7 (diff)
provider:checkbox: fix bad error case in camera_test
This patch changes CameraTest._get_supported_resolutions() not to return early from the per-format loop when an IOError occurs while manipulating the device. This allows the 'resolutions' element to be assigned which ensures that every dictionary in supported_formats has that element set. This bug can happen, for example, when the current user has no permission to manipulate the camera device and gets an IOError with EPERM inside. Fixes: https://bugs.launchpad.net/plainbox-provider-checkbox/+bug/1235426 Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
-rwxr-xr-xbin/camera_test1
1 files changed, 0 insertions, 1 deletions
diff --git a/bin/camera_test b/bin/camera_test
index 019736c..4e2aff1 100755
--- a/bin/camera_test
+++ b/bin/camera_test
@@ -441,7 +441,6 @@ class CameraTest:
if e.errno != errno.EINVAL:
print("Unable to determine supported framesizes "
"(resolutions), this may be a driver issue.")
- return supported_formats
supported_format['resolutions'] = resolutions
return supported_formats