Fix logic for camera check. Still run the test if webcam is found
TBR: phoglund@webrtc.org
No-Try: True
Bug: chromium:755660
Change-Id: Iea1ae4a599a644aca18181f68fe155a659163766
Reviewed-on: https://webrtc-review.googlesource.com/77426
Commit-Queue: Oleh Prypin <oprypin@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23286}
diff --git a/tools_webrtc/ensure_webcam_is_running.py b/tools_webrtc/ensure_webcam_is_running.py
index 952ebd6..10153a1 100755
--- a/tools_webrtc/ensure_webcam_is_running.py
+++ b/tools_webrtc/ensure_webcam_is_running.py
@@ -110,13 +110,14 @@
def Main(argv):
- if IsWebCamRunning():
- return 0
- if not StartWebCam():
- return 1
+ if not IsWebCamRunning():
+ if not StartWebCam():
+ return 1
if argv:
return subprocess.call(_ForcePythonInterpreter(argv))
+ else:
+ return 0
if __name__ == '__main__':