{"action":"closed","issue":{"url":"https://api.github.com/repos/domokit/devtools/issues/12","labels_url":"https://api.github.com/repos/domokit/devtools/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/domokit/devtools/issues/12/comments","events_url":"https://api.github.com/repos/domokit/devtools/issues/12/events","html_url":"https://github.com/domokit/devtools/issues/12","id":86573090,"number":12,"title":"Provide device_check() in android_shell.py","user":{"login":"ppiet","id":1824302,"avatar_url":"https://avatars.githubusercontent.com/u/1824302?v=3","gravatar_id":"","url":"https://api.github.com/users/ppiet","html_url":"https://github.com/ppiet","followers_url":"https://api.github.com/users/ppiet/followers","following_url":"https://api.github.com/users/ppiet/following{/other_user}","gists_url":"https://api.github.com/users/ppiet/gists{/gist_id}","starred_url":"https://api.github.com/users/ppiet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ppiet/subscriptions","organizations_url":"https://api.github.com/users/ppiet/orgs","repos_url":"https://api.github.com/users/ppiet/repos","events_url":"https://api.github.com/users/ppiet/events{/privacy}","received_events_url":"https://api.github.com/users/ppiet/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-09T12:01:31Z","updated_at":"2015-06-10T13:25:35Z","closed_at":"2015-06-10T13:25:35Z","body":"Currently when no Android device is attached and we try to work with android_shell, we get an error with a stacktrace:\r\n\r\nerror: device not found\r\nTraceback (most recent call last):\r\n  File \"mojo/tools/mojo_shell.py\", line 141, in <module>\r\n    sys.exit(main())\r\n  File \"mojo/tools/mojo_shell.py\", line 85, in main\r\n    shell.InstallApk(paths.target_mojo_shell_path)\r\n  File \"/usr/local/work/mojo/src/mojo/tools/../devtools/common/devtoolslib/android_shell.py\", line 165, in InstallApk\r\n    'shell', 'cat', device_sha1_path]))\r\n  File \"/usr/lib/python2.7/subprocess.py\", line 573, in check_output\r\n    raise CalledProcessError(retcode, cmd, output=output)\r\nsubprocess.CalledProcessError: Command '['/usr/local/work/mojo/src/third_party/android_tools/sdk/platform-tools/adb', 'shell', 'cat', '/sdcard/org.chromium.mojo.shell/MojoShell.sha1']' returned non-zero exit status 255\r\n\r\nWe should probably provide a \"device_check()\" step that would print a user-friendly message if the device is missing."}}