{"action":"closed","number":452,"pull_request":{"url":"https://api.github.com/repos/ARM-software/workload-automation/pulls/452","id":133687388,"html_url":"https://github.com/ARM-software/workload-automation/pull/452","diff_url":"https://github.com/ARM-software/workload-automation/pull/452.diff","patch_url":"https://github.com/ARM-software/workload-automation/pull/452.patch","issue_url":"https://api.github.com/repos/ARM-software/workload-automation/issues/452","number":452,"state":"closed","locked":false,"title":"Device: raise RuntimeError in _check_ready","user":{"login":"setrofim","id":904685,"avatar_url":"https://avatars0.githubusercontent.com/u/904685?v=4","gravatar_id":"","url":"https://api.github.com/users/setrofim","html_url":"https://github.com/setrofim","followers_url":"https://api.github.com/users/setrofim/followers","following_url":"https://api.github.com/users/setrofim/following{/other_user}","gists_url":"https://api.github.com/users/setrofim/gists{/gist_id}","starred_url":"https://api.github.com/users/setrofim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/setrofim/subscriptions","organizations_url":"https://api.github.com/users/setrofim/orgs","repos_url":"https://api.github.com/users/setrofim/repos","events_url":"https://api.github.com/users/setrofim/events{/privacy}","received_events_url":"https://api.github.com/users/setrofim/received_events","type":"User","site_admin":false},"body":"Previously, a AttributeError has been raised. This causes issues when\r\nattempting to access some properties that rely on invoking commands on\r\nthe device. The error would get swallowed up in Python attribute\r\nresolution machinery, resulting in an error claiming a missing\r\nattribute.\r\n\r\nFor example, for AndroidDevice, \"abi\" is a property that internally\r\ncalls getprop(), which executes on the device, and thus requires a\r\nconnection. If attempting to access device.abi before device.connect()\r\nhas been invoked, the following sequence takes place\r\n\r\n1. Caller tries to access attribute \"abi\" of device, which resolves to\r\n   the device.abi property defined in the class.\r\n2. device.abi calls device.getprop()\r\n3. ...which calls device.execute()\r\n4. ...which calls device._check_ready()\r\n5. device._check_ready() raises AttributeError('device not ready.')\r\n6. That gets propagated all the way up to 1., which gets interpreted\r\n   as attribute not being found.\r\n7. Since AndroidDevice defines a __getattr__(), that gets called next\r\n8. __getattr__() looks for a loaded Device module that has an \"abi\"\r\n   attribute. Since there isn't one, it raises AttributeError('abi').\r\n\r\nThe result is that the error reports a missing \"abi\" attribute, rather\r\nthan \"device not ready\", leading to some fun debugging.\r\n\r\nRaising RuntimeError (which more appropriate for the circumstances\r\nanyway) does not trigger __getattr__, so the correct error message is\r\nreported to the user. The text of the message has also been adjusted to\r\nmake it clearer what has likely gone wrong.","created_at":"2017-08-02T11:45:18Z","updated_at":"2017-08-02T12:43:07Z","closed_at":"2017-08-02T12:43:07Z","merged_at":"2017-08-02T12:43:07Z","merge_commit_sha":"220e0962e12e6e25d0cdba14c5a8bbb7374cc3cb","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/ARM-software/workload-automation/pulls/452/commits","review_comments_url":"https://api.github.com/repos/ARM-software/workload-automation/pulls/452/comments","review_comment_url":"https://api.github.com/repos/ARM-software/workload-automation/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ARM-software/workload-automation/issues/452/comments","statuses_url":"https://api.github.com/repos/ARM-software/workload-automation/statuses/be3c91b1317fee58607b47d08df040fe650b307f","head":{"label":"setrofim:master","ref":"master","sha":"be3c91b1317fee58607b47d08df040fe650b307f","user":{"login":"setrofim","id":904685,"avatar_url":"https://avatars0.githubusercontent.com/u/904685?v=4","gravatar_id":"","url":"https://api.github.com/users/setrofim","html_url":"https://github.com/setrofim","followers_url":"https://api.github.com/users/setrofim/followers","following_url":"https://api.github.com/users/setrofim/following{/other_user}","gists_url":"https://api.github.com/users/setrofim/gists{/gist_id}","starred_url":"https://api.github.com/users/setrofim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/setrofim/subscriptions","organizations_url":"https://api.github.com/users/setrofim/orgs","repos_url":"https://api.github.com/users/setrofim/repos","events_url":"https://api.github.com/users/setrofim/events{/privacy}","received_events_url":"https://api.github.com/users/setrofim/received_events","type":"User","site_admin":false},"repo":{"id":32029830,"name":"workload-automation","full_name":"setrofim/workload-automation","owner":{"login":"setrofim","id":904685,"avatar_url":"https://avatars0.githubusercontent.com/u/904685?v=4","gravatar_id":"","url":"https://api.github.com/users/setrofim","html_url":"https://github.com/setrofim","followers_url":"https://api.github.com/users/setrofim/followers","following_url":"https://api.github.com/users/setrofim/following{/other_user}","gists_url":"https://api.github.com/users/setrofim/gists{/gist_id}","starred_url":"https://api.github.com/users/setrofim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/setrofim/subscriptions","organizations_url":"https://api.github.com/users/setrofim/orgs","repos_url":"https://api.github.com/users/setrofim/repos","events_url":"https://api.github.com/users/setrofim/events{/privacy}","received_events_url":"https://api.github.com/users/setrofim/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/setrofim/workload-automation","description":"A framework for automating workload execution and measurement collection on ARM devices.","fork":true,"url":"https://api.github.com/repos/setrofim/workload-automation","forks_url":"https://api.github.com/repos/setrofim/workload-automation/forks","keys_url":"https://api.github.com/repos/setrofim/workload-automation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/setrofim/workload-automation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/setrofim/workload-automation/teams","hooks_url":"https://api.github.com/repos/setrofim/workload-automation/hooks","issue_events_url":"https://api.github.com/repos/setrofim/workload-automation/issues/events{/number}","events_url":"https://api.github.com/repos/setrofim/workload-automation/events","assignees_url":"https://api.github.com/repos/setrofim/workload-automation/assignees{/user}","branches_url":"https://api.github.com/repos/setrofim/workload-automation/branches{/branch}","tags_url":"https://api.github.com/repos/setrofim/workload-automation/tags","blobs_url":"https://api.github.com/repos/setrofim/workload-automation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/setrofim/workload-automation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/setrofim/workload-automation/git/refs{/sha}","trees_url":"https://api.github.com/repos/setrofim/workload-automation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/setrofim/workload-automation/statuses/{sha}","languages_url":"https://api.github.com/repos/setrofim/workload-automation/languages","stargazers_url":"https://api.github.com/repos/setrofim/workload-automation/stargazers","contributors_url":"https://api.github.com/repos/setrofim/workload-automation/contributors","subscribers_url":"https://api.github.com/repos/setrofim/workload-automation/subscribers","subscription_url":"https://api.github.com/repos/setrofim/workload-automation/subscription","commits_url":"https://api.github.com/repos/setrofim/workload-automation/commits{/sha}","git_commits_url":"https://api.github.com/repos/setrofim/workload-automation/git/commits{/sha}","comments_url":"https://api.github.com/repos/setrofim/workload-automation/comments{/number}","issue_comment_url":"https://api.github.com/repos/setrofim/workload-automation/issues/comments{/number}","contents_url":"https://api.github.com/repos/setrofim/workload-automation/contents/{+path}","compare_url":"https://api.github.com/repos/setrofim/workload-automation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/setrofim/workload-automation/merges","archive_url":"https://api.github.com/repos/setrofim/workload-automation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/setrofim/workload-automation/downloads","issues_url":"https://api.github.com/repos/setrofim/workload-automation/issues{/number}","pulls_url":"https://api.github.com/repos/setrofim/workload-automation/pulls{/number}","milestones_url":"https://api.github.com/repos/setrofim/workload-automation/milestones{/number}","notifications_url":"https://api.github.com/repos/setrofim/workload-automation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/setrofim/workload-automation/labels{/name}","releases_url":"https://api.github.com/repos/setrofim/workload-automation/releases{/id}","deployments_url":"https://api.github.com/repos/setrofim/workload-automation/deployments","created_at":"2015-03-11T16:57:33Z","updated_at":"2016-01-12T10:01:04Z","pushed_at":"2017-08-02T12:40:18Z","git_url":"git://github.com/setrofim/workload-automation.git","ssh_url":"git@github.com:setrofim/workload-automation.git","clone_url":"https://github.com/setrofim/workload-automation.git","svn_url":"https://github.com/setrofim/workload-automation","homepage":null,"size":84005,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ARM-software:master","ref":"master","sha":"efad084b24bfd2b3f03be86b7b5ce24e3266ade1","user":{"login":"ARM-software","id":5690313,"avatar_url":"https://avatars1.githubusercontent.com/u/5690313?v=4","gravatar_id":"","url":"https://api.github.com/users/ARM-software","html_url":"https://github.com/ARM-software","followers_url":"https://api.github.com/users/ARM-software/followers","following_url":"https://api.github.com/users/ARM-software/following{/other_user}","gists_url":"https://api.github.com/users/ARM-software/gists{/gist_id}","starred_url":"https://api.github.com/users/ARM-software/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ARM-software/subscriptions","organizations_url":"https://api.github.com/users/ARM-software/orgs","repos_url":"https://api.github.com/users/ARM-software/repos","events_url":"https://api.github.com/users/ARM-software/events{/privacy}","received_events_url":"https://api.github.com/users/ARM-software/received_events","type":"Organization","site_admin":false},"repo":{"id":31957801,"name":"workload-automation","full_name":"ARM-software/workload-automation","owner":{"login":"ARM-software","id":5690313,"avatar_url":"https://avatars1.githubusercontent.com/u/5690313?v=4","gravatar_id":"","url":"https://api.github.com/users/ARM-software","html_url":"https://github.com/ARM-software","followers_url":"https://api.github.com/users/ARM-software/followers","following_url":"https://api.github.com/users/ARM-software/following{/other_user}","gists_url":"https://api.github.com/users/ARM-software/gists{/gist_id}","starred_url":"https://api.github.com/users/ARM-software/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ARM-software/subscriptions","organizations_url":"https://api.github.com/users/ARM-software/orgs","repos_url":"https://api.github.com/users/ARM-software/repos","events_url":"https://api.github.com/users/ARM-software/events{/privacy}","received_events_url":"https://api.github.com/users/ARM-software/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ARM-software/workload-automation","description":"A framework for automating workload execution and measurement collection on ARM devices.","fork":false,"url":"https://api.github.com/repos/ARM-software/workload-automation","forks_url":"https://api.github.com/repos/ARM-software/workload-automation/forks","keys_url":"https://api.github.com/repos/ARM-software/workload-automation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ARM-software/workload-automation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ARM-software/workload-automation/teams","hooks_url":"https://api.github.com/repos/ARM-software/workload-automation/hooks","issue_events_url":"https://api.github.com/repos/ARM-software/workload-automation/issues/events{/number}","events_url":"https://api.github.com/repos/ARM-software/workload-automation/events","assignees_url":"https://api.github.com/repos/ARM-software/workload-automation/assignees{/user}","branches_url":"https://api.github.com/repos/ARM-software/workload-automation/branches{/branch}","tags_url":"https://api.github.com/repos/ARM-software/workload-automation/tags","blobs_url":"https://api.github.com/repos/ARM-software/workload-automation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ARM-software/workload-automation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ARM-software/workload-automation/git/refs{/sha}","trees_url":"https://api.github.com/repos/ARM-software/workload-automation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ARM-software/workload-automation/statuses/{sha}","languages_url":"https://api.github.com/repos/ARM-software/workload-automation/languages","stargazers_url":"https://api.github.com/repos/ARM-software/workload-automation/stargazers","contributors_url":"https://api.github.com/repos/ARM-software/workload-automation/contributors","subscribers_url":"https://api.github.com/repos/ARM-software/workload-automation/subscribers","subscription_url":"https://api.github.com/repos/ARM-software/workload-automation/subscription","commits_url":"https://api.github.com/repos/ARM-software/workload-automation/commits{/sha}","git_commits_url":"https://api.github.com/repos/ARM-software/workload-automation/git/commits{/sha}","comments_url":"https://api.github.com/repos/ARM-software/workload-automation/comments{/number}","issue_comment_url":"https://api.github.com/repos/ARM-software/workload-automation/issues/comments{/number}","contents_url":"https://api.github.com/repos/ARM-software/workload-automation/contents/{+path}","compare_url":"https://api.github.com/repos/ARM-software/workload-automation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ARM-software/workload-automation/merges","archive_url":"https://api.github.com/repos/ARM-software/workload-automation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ARM-software/workload-automation/downloads","issues_url":"https://api.github.com/repos/ARM-software/workload-automation/issues{/number}","pulls_url":"https://api.github.com/repos/ARM-software/workload-automation/pulls{/number}","milestones_url":"https://api.github.com/repos/ARM-software/workload-automation/milestones{/number}","notifications_url":"https://api.github.com/repos/ARM-software/workload-automation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ARM-software/workload-automation/labels{/name}","releases_url":"https://api.github.com/repos/ARM-software/workload-automation/releases{/id}","deployments_url":"https://api.github.com/repos/ARM-software/workload-automation/deployments","created_at":"2015-03-10T13:05:03Z","updated_at":"2017-05-27T13:11:27Z","pushed_at":"2017-08-02T12:43:07Z","git_url":"git://github.com/ARM-software/workload-automation.git","ssh_url":"git@github.com:ARM-software/workload-automation.git","clone_url":"https://github.com/ARM-software/workload-automation.git","svn_url":"https://github.com/ARM-software/workload-automation","homepage":null,"size":85574,"stargazers_count":44,"watchers_count":44,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":45,"mirror_url":null,"open_issues_count":23,"forks":45,"open_issues":23,"watchers":44,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ARM-software/workload-automation/pulls/452"},"html":{"href":"https://github.com/ARM-software/workload-automation/pull/452"},"issue":{"href":"https://api.github.com/repos/ARM-software/workload-automation/issues/452"},"comments":{"href":"https://api.github.com/repos/ARM-software/workload-automation/issues/452/comments"},"review_comments":{"href":"https://api.github.com/repos/ARM-software/workload-automation/pulls/452/comments"},"review_comment":{"href":"https://api.github.com/repos/ARM-software/workload-automation/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ARM-software/workload-automation/pulls/452/commits"},"statuses":{"href":"https://api.github.com/repos/ARM-software/workload-automation/statuses/be3c91b1317fee58607b47d08df040fe650b307f"}},"merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"marcbonnici","id":22317974,"avatar_url":"https://avatars0.githubusercontent.com/u/22317974?v=4","gravatar_id":"","url":"https://api.github.com/users/marcbonnici","html_url":"https://github.com/marcbonnici","followers_url":"https://api.github.com/users/marcbonnici/followers","following_url":"https://api.github.com/users/marcbonnici/following{/other_user}","gists_url":"https://api.github.com/users/marcbonnici/gists{/gist_id}","starred_url":"https://api.github.com/users/marcbonnici/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcbonnici/subscriptions","organizations_url":"https://api.github.com/users/marcbonnici/orgs","repos_url":"https://api.github.com/users/marcbonnici/repos","events_url":"https://api.github.com/users/marcbonnici/events{/privacy}","received_events_url":"https://api.github.com/users/marcbonnici/received_events","type":"User","site_admin":false},"comments":2,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":1,"deletions":1,"changed_files":1}}
{"actor":{"display_login":"marcbonnici"}}