Only set the ADB path if it exists. Fixes domokit/devtools#60 BUG= R=jeffbrown@google.com Review URL: https://codereview.chromium.org/1781063002 . Cr-Mirrored-From: https://github.com/domokit/mojo Cr-Mirrored-Commit: 2b364b40eed465e50c58afc5901f36421ee3b698
diff --git a/devtoolslib/paths.py b/devtoolslib/paths.py index 8c592ae..870dd0a 100644 --- a/devtoolslib/paths.py +++ b/devtoolslib/paths.py
@@ -59,8 +59,10 @@ params['build_dir_path'] = build_dir_path if is_android: params['shell_path'] = os.path.join(build_dir_path, 'apks', 'MojoShell.apk') - params['adb_path'] = os.path.join(root_path, 'third_party', 'android_tools', - 'sdk', 'platform-tools', 'adb') + adb_path = os.path.join(root_path, 'third_party', 'android_tools', + 'sdk', 'platform-tools', 'adb') + if os.path.isfile(adb_path): + params['adb_path'] = adb_path else: params['shell_path'] = os.path.join(build_dir_path, 'mojo_shell')