{"action":"closed","number":669,"pull_request":{"url":"https://api.github.com/repos/sugarlabs/sugar/pulls/669","id":64307522,"html_url":"https://github.com/sugarlabs/sugar/pull/669","diff_url":"https://github.com/sugarlabs/sugar/pull/669.diff","patch_url":"https://github.com/sugarlabs/sugar/pull/669.patch","issue_url":"https://api.github.com/repos/sugarlabs/sugar/issues/669","number":669,"state":"closed","locked":false,"title":"Fix brightness restore crash","user":{"login":"quozl","id":2936481,"avatar_url":"https://avatars.githubusercontent.com/u/2936481?v=3","gravatar_id":"","url":"https://api.github.com/users/quozl","html_url":"https://github.com/quozl","followers_url":"https://api.github.com/users/quozl/followers","following_url":"https://api.github.com/users/quozl/following{/other_user}","gists_url":"https://api.github.com/users/quozl/gists{/gist_id}","starred_url":"https://api.github.com/users/quozl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quozl/subscriptions","organizations_url":"https://api.github.com/users/quozl/orgs","repos_url":"https://api.github.com/users/quozl/repos","events_url":"https://api.github.com/users/quozl/events{/privacy}","received_events_url":"https://api.github.com/users/quozl/received_events","type":"User","site_admin":false},"body":"On systems with no brightness control, such as an XO-1 with kernel\r\n4.6-rc1 due to 82ef33af9dd30075adbd9f3dd161b606b8ba88ac, Sugar does\r\ncrash on start with this shell.log fragment;\r\n\r\nTraceback (most recent call last):\r\n  File \"/usr/lib/python2.7/runpy.py\", line 162, in _run_module_as_main\r\n    \"__main__\", fname, loader, pkg_name)\r\n  File \"/usr/lib/python2.7/runpy.py\", line 72, in _run_code\r\n    exec code in run_globals\r\n  File \"/usr/lib/python2.7/site-packages/jarabe/main.py\", line 428, in <module>\r\n    main()\r\n  File \"/usr/lib/python2.7/site-packages/jarabe/main.py\", line 410, in main\r\n    brightness.get_instance()\r\n  File \"/usr/lib/python2.7/site-packages/jarabe/model/brightness.py\", line 30, in get_instance\r\n    _instance = Brightness()\r\n  File \"/usr/lib/python2.7/site-packages/jarabe/model/brightness.py\", line 53, in __init__\r\n    self._restore()\r\n  File \"/usr/lib/python2.7/site-packages/jarabe/model/brightness.py\", line 67, in _restore\r\n    self.set_brightness(value)\r\n  File \"/usr/lib/python2.7/site-packages/jarabe/model/brightness.py\", line 108, in set_brightness\r\n    self._monitor.handler_block(self._monitor_changed_hid)\r\nAttributeError: 'NoneType' object has no attribute 'handler_block'\r\n\r\nFix is to avoid dereferencing _monitor if it is None.","created_at":"2016-03-28T10:04:57Z","updated_at":"2016-04-03T02:45:51Z","closed_at":"2016-04-03T02:45:51Z","merged_at":"2016-04-03T02:45:51Z","merge_commit_sha":"7aa9b7a92fbbbff77e28be0fee6e8af6ef061943","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sugarlabs/sugar/pulls/669/commits","review_comments_url":"https://api.github.com/repos/sugarlabs/sugar/pulls/669/comments","review_comment_url":"https://api.github.com/repos/sugarlabs/sugar/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sugarlabs/sugar/issues/669/comments","statuses_url":"https://api.github.com/repos/sugarlabs/sugar/statuses/7aa9b7a92fbbbff77e28be0fee6e8af6ef061943","head":{"label":"quozl:2016-088-brightness","ref":"2016-088-brightness","sha":"7aa9b7a92fbbbff77e28be0fee6e8af6ef061943","user":{"login":"quozl","id":2936481,"avatar_url":"https://avatars.githubusercontent.com/u/2936481?v=3","gravatar_id":"","url":"https://api.github.com/users/quozl","html_url":"https://github.com/quozl","followers_url":"https://api.github.com/users/quozl/followers","following_url":"https://api.github.com/users/quozl/following{/other_user}","gists_url":"https://api.github.com/users/quozl/gists{/gist_id}","starred_url":"https://api.github.com/users/quozl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quozl/subscriptions","organizations_url":"https://api.github.com/users/quozl/orgs","repos_url":"https://api.github.com/users/quozl/repos","events_url":"https://api.github.com/users/quozl/events{/privacy}","received_events_url":"https://api.github.com/users/quozl/received_events","type":"User","site_admin":false},"repo":{"id":24444299,"name":"sugar","full_name":"quozl/sugar","owner":{"login":"quozl","id":2936481,"avatar_url":"https://avatars.githubusercontent.com/u/2936481?v=3","gravatar_id":"","url":"https://api.github.com/users/quozl","html_url":"https://github.com/quozl","followers_url":"https://api.github.com/users/quozl/followers","following_url":"https://api.github.com/users/quozl/following{/other_user}","gists_url":"https://api.github.com/users/quozl/gists{/gist_id}","starred_url":"https://api.github.com/users/quozl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quozl/subscriptions","organizations_url":"https://api.github.com/users/quozl/orgs","repos_url":"https://api.github.com/users/quozl/repos","events_url":"https://api.github.com/users/quozl/events{/privacy}","received_events_url":"https://api.github.com/users/quozl/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/quozl/sugar","description":"Sugar GTK shell","fork":true,"url":"https://api.github.com/repos/quozl/sugar","forks_url":"https://api.github.com/repos/quozl/sugar/forks","keys_url":"https://api.github.com/repos/quozl/sugar/keys{/key_id}","collaborators_url":"https://api.github.com/repos/quozl/sugar/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/quozl/sugar/teams","hooks_url":"https://api.github.com/repos/quozl/sugar/hooks","issue_events_url":"https://api.github.com/repos/quozl/sugar/issues/events{/number}","events_url":"https://api.github.com/repos/quozl/sugar/events","assignees_url":"https://api.github.com/repos/quozl/sugar/assignees{/user}","branches_url":"https://api.github.com/repos/quozl/sugar/branches{/branch}","tags_url":"https://api.github.com/repos/quozl/sugar/tags","blobs_url":"https://api.github.com/repos/quozl/sugar/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/quozl/sugar/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/quozl/sugar/git/refs{/sha}","trees_url":"https://api.github.com/repos/quozl/sugar/git/trees{/sha}","statuses_url":"https://api.github.com/repos/quozl/sugar/statuses/{sha}","languages_url":"https://api.github.com/repos/quozl/sugar/languages","stargazers_url":"https://api.github.com/repos/quozl/sugar/stargazers","contributors_url":"https://api.github.com/repos/quozl/sugar/contributors","subscribers_url":"https://api.github.com/repos/quozl/sugar/subscribers","subscription_url":"https://api.github.com/repos/quozl/sugar/subscription","commits_url":"https://api.github.com/repos/quozl/sugar/commits{/sha}","git_commits_url":"https://api.github.com/repos/quozl/sugar/git/commits{/sha}","comments_url":"https://api.github.com/repos/quozl/sugar/comments{/number}","issue_comment_url":"https://api.github.com/repos/quozl/sugar/issues/comments{/number}","contents_url":"https://api.github.com/repos/quozl/sugar/contents/{+path}","compare_url":"https://api.github.com/repos/quozl/sugar/compare/{base}...{head}","merges_url":"https://api.github.com/repos/quozl/sugar/merges","archive_url":"https://api.github.com/repos/quozl/sugar/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/quozl/sugar/downloads","issues_url":"https://api.github.com/repos/quozl/sugar/issues{/number}","pulls_url":"https://api.github.com/repos/quozl/sugar/pulls{/number}","milestones_url":"https://api.github.com/repos/quozl/sugar/milestones{/number}","notifications_url":"https://api.github.com/repos/quozl/sugar/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/quozl/sugar/labels{/name}","releases_url":"https://api.github.com/repos/quozl/sugar/releases{/id}","deployments_url":"https://api.github.com/repos/quozl/sugar/deployments","created_at":"2014-09-25T04:57:08Z","updated_at":"2014-12-10T03:13:15Z","pushed_at":"2016-03-28T10:04:00Z","git_url":"git://github.com/quozl/sugar.git","ssh_url":"git@github.com:quozl/sugar.git","clone_url":"https://github.com/quozl/sugar.git","svn_url":"https://github.com/quozl/sugar","homepage":"","size":24451,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"sugarlabs:master","ref":"master","sha":"b0b8a04eb5f741ff6e163938784d328b725b9b76","user":{"login":"sugarlabs","id":3996398,"avatar_url":"https://avatars.githubusercontent.com/u/3996398?v=3","gravatar_id":"","url":"https://api.github.com/users/sugarlabs","html_url":"https://github.com/sugarlabs","followers_url":"https://api.github.com/users/sugarlabs/followers","following_url":"https://api.github.com/users/sugarlabs/following{/other_user}","gists_url":"https://api.github.com/users/sugarlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/sugarlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sugarlabs/subscriptions","organizations_url":"https://api.github.com/users/sugarlabs/orgs","repos_url":"https://api.github.com/users/sugarlabs/repos","events_url":"https://api.github.com/users/sugarlabs/events{/privacy}","received_events_url":"https://api.github.com/users/sugarlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":10601176,"name":"sugar","full_name":"sugarlabs/sugar","owner":{"login":"sugarlabs","id":3996398,"avatar_url":"https://avatars.githubusercontent.com/u/3996398?v=3","gravatar_id":"","url":"https://api.github.com/users/sugarlabs","html_url":"https://github.com/sugarlabs","followers_url":"https://api.github.com/users/sugarlabs/followers","following_url":"https://api.github.com/users/sugarlabs/following{/other_user}","gists_url":"https://api.github.com/users/sugarlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/sugarlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sugarlabs/subscriptions","organizations_url":"https://api.github.com/users/sugarlabs/orgs","repos_url":"https://api.github.com/users/sugarlabs/repos","events_url":"https://api.github.com/users/sugarlabs/events{/privacy}","received_events_url":"https://api.github.com/users/sugarlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sugarlabs/sugar","description":"Sugar GTK shell","fork":false,"url":"https://api.github.com/repos/sugarlabs/sugar","forks_url":"https://api.github.com/repos/sugarlabs/sugar/forks","keys_url":"https://api.github.com/repos/sugarlabs/sugar/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sugarlabs/sugar/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sugarlabs/sugar/teams","hooks_url":"https://api.github.com/repos/sugarlabs/sugar/hooks","issue_events_url":"https://api.github.com/repos/sugarlabs/sugar/issues/events{/number}","events_url":"https://api.github.com/repos/sugarlabs/sugar/events","assignees_url":"https://api.github.com/repos/sugarlabs/sugar/assignees{/user}","branches_url":"https://api.github.com/repos/sugarlabs/sugar/branches{/branch}","tags_url":"https://api.github.com/repos/sugarlabs/sugar/tags","blobs_url":"https://api.github.com/repos/sugarlabs/sugar/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sugarlabs/sugar/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sugarlabs/sugar/git/refs{/sha}","trees_url":"https://api.github.com/repos/sugarlabs/sugar/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sugarlabs/sugar/statuses/{sha}","languages_url":"https://api.github.com/repos/sugarlabs/sugar/languages","stargazers_url":"https://api.github.com/repos/sugarlabs/sugar/stargazers","contributors_url":"https://api.github.com/repos/sugarlabs/sugar/contributors","subscribers_url":"https://api.github.com/repos/sugarlabs/sugar/subscribers","subscription_url":"https://api.github.com/repos/sugarlabs/sugar/subscription","commits_url":"https://api.github.com/repos/sugarlabs/sugar/commits{/sha}","git_commits_url":"https://api.github.com/repos/sugarlabs/sugar/git/commits{/sha}","comments_url":"https://api.github.com/repos/sugarlabs/sugar/comments{/number}","issue_comment_url":"https://api.github.com/repos/sugarlabs/sugar/issues/comments{/number}","contents_url":"https://api.github.com/repos/sugarlabs/sugar/contents/{+path}","compare_url":"https://api.github.com/repos/sugarlabs/sugar/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sugarlabs/sugar/merges","archive_url":"https://api.github.com/repos/sugarlabs/sugar/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sugarlabs/sugar/downloads","issues_url":"https://api.github.com/repos/sugarlabs/sugar/issues{/number}","pulls_url":"https://api.github.com/repos/sugarlabs/sugar/pulls{/number}","milestones_url":"https://api.github.com/repos/sugarlabs/sugar/milestones{/number}","notifications_url":"https://api.github.com/repos/sugarlabs/sugar/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sugarlabs/sugar/labels{/name}","releases_url":"https://api.github.com/repos/sugarlabs/sugar/releases{/id}","deployments_url":"https://api.github.com/repos/sugarlabs/sugar/deployments","created_at":"2013-06-10T13:49:20Z","updated_at":"2016-03-19T00:03:31Z","pushed_at":"2016-04-03T02:45:50Z","git_url":"git://github.com/sugarlabs/sugar.git","ssh_url":"git@github.com:sugarlabs/sugar.git","clone_url":"https://github.com/sugarlabs/sugar.git","svn_url":"https://github.com/sugarlabs/sugar","homepage":"","size":25733,"stargazers_count":40,"watchers_count":40,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":104,"mirror_url":null,"open_issues_count":16,"forks":104,"open_issues":16,"watchers":40,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sugarlabs/sugar/pulls/669"},"html":{"href":"https://github.com/sugarlabs/sugar/pull/669"},"issue":{"href":"https://api.github.com/repos/sugarlabs/sugar/issues/669"},"comments":{"href":"https://api.github.com/repos/sugarlabs/sugar/issues/669/comments"},"review_comments":{"href":"https://api.github.com/repos/sugarlabs/sugar/pulls/669/comments"},"review_comment":{"href":"https://api.github.com/repos/sugarlabs/sugar/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sugarlabs/sugar/pulls/669/commits"},"statuses":{"href":"https://api.github.com/repos/sugarlabs/sugar/statuses/7aa9b7a92fbbbff77e28be0fee6e8af6ef061943"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"samdroid-apps","id":6022042,"avatar_url":"https://avatars.githubusercontent.com/u/6022042?v=3","gravatar_id":"","url":"https://api.github.com/users/samdroid-apps","html_url":"https://github.com/samdroid-apps","followers_url":"https://api.github.com/users/samdroid-apps/followers","following_url":"https://api.github.com/users/samdroid-apps/following{/other_user}","gists_url":"https://api.github.com/users/samdroid-apps/gists{/gist_id}","starred_url":"https://api.github.com/users/samdroid-apps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samdroid-apps/subscriptions","organizations_url":"https://api.github.com/users/samdroid-apps/orgs","repos_url":"https://api.github.com/users/samdroid-apps/repos","events_url":"https://api.github.com/users/samdroid-apps/events{/privacy}","received_events_url":"https://api.github.com/users/samdroid-apps/received_events","type":"User","site_admin":false},"comments":1,"review_comments":0,"commits":1,"additions":8,"deletions":6,"changed_files":1}}