{"action":"created","comment":{"url":"https://api.github.com/repos/mesonbuild/meson/pulls/comments/80375635","id":80375635,"diff_hunk":"@@ -45,7 +45,11 @@ def compile_resources(self, state, args, kwargs):\n         if not isinstance(source_dirs, list):\n             source_dirs = [source_dirs]\n \n-        ifile = args[1]\n+        try:\n+            ifile = args[1]\n+        except IndexError:","path":"mesonbuild/modules/gnome.py","position":null,"original_position":7,"commit_id":"8a7eaf450199db95084d43c035af87109d98c0f0","original_commit_id":"cb3abc2097aee4641d93136a0d390c4feb917b13","user":{"login":"QuLogic","id":302469,"avatar_url":"https://avatars.githubusercontent.com/u/302469?v=3","gravatar_id":"","url":"https://api.github.com/users/QuLogic","html_url":"https://github.com/QuLogic","followers_url":"https://api.github.com/users/QuLogic/followers","following_url":"https://api.github.com/users/QuLogic/following{/other_user}","gists_url":"https://api.github.com/users/QuLogic/gists{/gist_id}","starred_url":"https://api.github.com/users/QuLogic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/QuLogic/subscriptions","organizations_url":"https://api.github.com/users/QuLogic/orgs","repos_url":"https://api.github.com/users/QuLogic/repos","events_url":"https://api.github.com/users/QuLogic/events{/privacy}","received_events_url":"https://api.github.com/users/QuLogic/received_events","type":"User","site_admin":false},"body":"I know this is an outdated diff, but this is a pretty standard way of doing things in Python. As long as your `try:` contents are as small as possible, it's not really unclear and is fairly [Pythonic](https://docs.python.org/3/glossary.html#term-eafp).","created_at":"2016-09-25T07:14:27Z","updated_at":"2016-09-25T07:14:27Z","html_url":"https://github.com/mesonbuild/meson/pull/811#discussion_r80375635","pull_request_url":"https://api.github.com/repos/mesonbuild/meson/pulls/811","_links":{"self":{"href":"https://api.github.com/repos/mesonbuild/meson/pulls/comments/80375635"},"html":{"href":"https://github.com/mesonbuild/meson/pull/811#discussion_r80375635"},"pull_request":{"href":"https://api.github.com/repos/mesonbuild/meson/pulls/811"}}},"pull_request":{"url":"https://api.github.com/repos/mesonbuild/meson/pulls/811","id":86636885,"html_url":"https://github.com/mesonbuild/meson/pull/811","diff_url":"https://github.com/mesonbuild/meson/pull/811.diff","patch_url":"https://github.com/mesonbuild/meson/pull/811.patch","issue_url":"https://api.github.com/repos/mesonbuild/meson/issues/811","number":811,"state":"open","locked":false,"title":"gnome: Print useful error if missing compile_resource arg","user":{"login":"TingPing","id":798838,"avatar_url":"https://avatars.githubusercontent.com/u/798838?v=3","gravatar_id":"","url":"https://api.github.com/users/TingPing","html_url":"https://github.com/TingPing","followers_url":"https://api.github.com/users/TingPing/followers","following_url":"https://api.github.com/users/TingPing/following{/other_user}","gists_url":"https://api.github.com/users/TingPing/gists{/gist_id}","starred_url":"https://api.github.com/users/TingPing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TingPing/subscriptions","organizations_url":"https://api.github.com/users/TingPing/orgs","repos_url":"https://api.github.com/users/TingPing/repos","events_url":"https://api.github.com/users/TingPing/events{/privacy}","received_events_url":"https://api.github.com/users/TingPing/received_events","type":"User","site_admin":false},"body":"Better than a raw IndexError.","created_at":"2016-09-25T02:01:37Z","updated_at":"2016-09-25T07:14:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6c081b2a09ae98d2f6a84a4c0da198710fcad138","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/mesonbuild/meson/pulls/811/commits","review_comments_url":"https://api.github.com/repos/mesonbuild/meson/pulls/811/comments","review_comment_url":"https://api.github.com/repos/mesonbuild/meson/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mesonbuild/meson/issues/811/comments","statuses_url":"https://api.github.com/repos/mesonbuild/meson/statuses/8a7eaf450199db95084d43c035af87109d98c0f0","head":{"label":"TingPing:tingping/gnome-module","ref":"tingping/gnome-module","sha":"8a7eaf450199db95084d43c035af87109d98c0f0","user":{"login":"TingPing","id":798838,"avatar_url":"https://avatars.githubusercontent.com/u/798838?v=3","gravatar_id":"","url":"https://api.github.com/users/TingPing","html_url":"https://github.com/TingPing","followers_url":"https://api.github.com/users/TingPing/followers","following_url":"https://api.github.com/users/TingPing/following{/other_user}","gists_url":"https://api.github.com/users/TingPing/gists{/gist_id}","starred_url":"https://api.github.com/users/TingPing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TingPing/subscriptions","organizations_url":"https://api.github.com/users/TingPing/orgs","repos_url":"https://api.github.com/users/TingPing/repos","events_url":"https://api.github.com/users/TingPing/events{/privacy}","received_events_url":"https://api.github.com/users/TingPing/received_events","type":"User","site_admin":false},"repo":{"id":67115372,"name":"meson","full_name":"TingPing/meson","owner":{"login":"TingPing","id":798838,"avatar_url":"https://avatars.githubusercontent.com/u/798838?v=3","gravatar_id":"","url":"https://api.github.com/users/TingPing","html_url":"https://github.com/TingPing","followers_url":"https://api.github.com/users/TingPing/followers","following_url":"https://api.github.com/users/TingPing/following{/other_user}","gists_url":"https://api.github.com/users/TingPing/gists{/gist_id}","starred_url":"https://api.github.com/users/TingPing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TingPing/subscriptions","organizations_url":"https://api.github.com/users/TingPing/orgs","repos_url":"https://api.github.com/users/TingPing/repos","events_url":"https://api.github.com/users/TingPing/events{/privacy}","received_events_url":"https://api.github.com/users/TingPing/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/TingPing/meson","description":"The Meson Build System","fork":true,"url":"https://api.github.com/repos/TingPing/meson","forks_url":"https://api.github.com/repos/TingPing/meson/forks","keys_url":"https://api.github.com/repos/TingPing/meson/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TingPing/meson/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TingPing/meson/teams","hooks_url":"https://api.github.com/repos/TingPing/meson/hooks","issue_events_url":"https://api.github.com/repos/TingPing/meson/issues/events{/number}","events_url":"https://api.github.com/repos/TingPing/meson/events","assignees_url":"https://api.github.com/repos/TingPing/meson/assignees{/user}","branches_url":"https://api.github.com/repos/TingPing/meson/branches{/branch}","tags_url":"https://api.github.com/repos/TingPing/meson/tags","blobs_url":"https://api.github.com/repos/TingPing/meson/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TingPing/meson/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TingPing/meson/git/refs{/sha}","trees_url":"https://api.github.com/repos/TingPing/meson/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TingPing/meson/statuses/{sha}","languages_url":"https://api.github.com/repos/TingPing/meson/languages","stargazers_url":"https://api.github.com/repos/TingPing/meson/stargazers","contributors_url":"https://api.github.com/repos/TingPing/meson/contributors","subscribers_url":"https://api.github.com/repos/TingPing/meson/subscribers","subscription_url":"https://api.github.com/repos/TingPing/meson/subscription","commits_url":"https://api.github.com/repos/TingPing/meson/commits{/sha}","git_commits_url":"https://api.github.com/repos/TingPing/meson/git/commits{/sha}","comments_url":"https://api.github.com/repos/TingPing/meson/comments{/number}","issue_comment_url":"https://api.github.com/repos/TingPing/meson/issues/comments{/number}","contents_url":"https://api.github.com/repos/TingPing/meson/contents/{+path}","compare_url":"https://api.github.com/repos/TingPing/meson/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TingPing/meson/merges","archive_url":"https://api.github.com/repos/TingPing/meson/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TingPing/meson/downloads","issues_url":"https://api.github.com/repos/TingPing/meson/issues{/number}","pulls_url":"https://api.github.com/repos/TingPing/meson/pulls{/number}","milestones_url":"https://api.github.com/repos/TingPing/meson/milestones{/number}","notifications_url":"https://api.github.com/repos/TingPing/meson/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TingPing/meson/labels{/name}","releases_url":"https://api.github.com/repos/TingPing/meson/releases{/id}","deployments_url":"https://api.github.com/repos/TingPing/meson/deployments","created_at":"2016-09-01T08:59:52Z","updated_at":"2016-09-01T08:59:54Z","pushed_at":"2016-09-25T02:34:54Z","git_url":"git://github.com/TingPing/meson.git","ssh_url":"git@github.com:TingPing/meson.git","clone_url":"https://github.com/TingPing/meson.git","svn_url":"https://github.com/TingPing/meson","homepage":null,"size":3768,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"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":"mesonbuild:master","ref":"master","sha":"f1b6c89d9ca54831b753c7a4fa76d3e0980f8fd3","user":{"login":"mesonbuild","id":12551236,"avatar_url":"https://avatars.githubusercontent.com/u/12551236?v=3","gravatar_id":"","url":"https://api.github.com/users/mesonbuild","html_url":"https://github.com/mesonbuild","followers_url":"https://api.github.com/users/mesonbuild/followers","following_url":"https://api.github.com/users/mesonbuild/following{/other_user}","gists_url":"https://api.github.com/users/mesonbuild/gists{/gist_id}","starred_url":"https://api.github.com/users/mesonbuild/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mesonbuild/subscriptions","organizations_url":"https://api.github.com/users/mesonbuild/orgs","repos_url":"https://api.github.com/users/mesonbuild/repos","events_url":"https://api.github.com/users/mesonbuild/events{/privacy}","received_events_url":"https://api.github.com/users/mesonbuild/received_events","type":"Organization","site_admin":false},"repo":{"id":19784232,"name":"meson","full_name":"mesonbuild/meson","owner":{"login":"mesonbuild","id":12551236,"avatar_url":"https://avatars.githubusercontent.com/u/12551236?v=3","gravatar_id":"","url":"https://api.github.com/users/mesonbuild","html_url":"https://github.com/mesonbuild","followers_url":"https://api.github.com/users/mesonbuild/followers","following_url":"https://api.github.com/users/mesonbuild/following{/other_user}","gists_url":"https://api.github.com/users/mesonbuild/gists{/gist_id}","starred_url":"https://api.github.com/users/mesonbuild/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mesonbuild/subscriptions","organizations_url":"https://api.github.com/users/mesonbuild/orgs","repos_url":"https://api.github.com/users/mesonbuild/repos","events_url":"https://api.github.com/users/mesonbuild/events{/privacy}","received_events_url":"https://api.github.com/users/mesonbuild/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mesonbuild/meson","description":"The Meson Build System","fork":false,"url":"https://api.github.com/repos/mesonbuild/meson","forks_url":"https://api.github.com/repos/mesonbuild/meson/forks","keys_url":"https://api.github.com/repos/mesonbuild/meson/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mesonbuild/meson/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mesonbuild/meson/teams","hooks_url":"https://api.github.com/repos/mesonbuild/meson/hooks","issue_events_url":"https://api.github.com/repos/mesonbuild/meson/issues/events{/number}","events_url":"https://api.github.com/repos/mesonbuild/meson/events","assignees_url":"https://api.github.com/repos/mesonbuild/meson/assignees{/user}","branches_url":"https://api.github.com/repos/mesonbuild/meson/branches{/branch}","tags_url":"https://api.github.com/repos/mesonbuild/meson/tags","blobs_url":"https://api.github.com/repos/mesonbuild/meson/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mesonbuild/meson/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mesonbuild/meson/git/refs{/sha}","trees_url":"https://api.github.com/repos/mesonbuild/meson/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mesonbuild/meson/statuses/{sha}","languages_url":"https://api.github.com/repos/mesonbuild/meson/languages","stargazers_url":"https://api.github.com/repos/mesonbuild/meson/stargazers","contributors_url":"https://api.github.com/repos/mesonbuild/meson/contributors","subscribers_url":"https://api.github.com/repos/mesonbuild/meson/subscribers","subscription_url":"https://api.github.com/repos/mesonbuild/meson/subscription","commits_url":"https://api.github.com/repos/mesonbuild/meson/commits{/sha}","git_commits_url":"https://api.github.com/repos/mesonbuild/meson/git/commits{/sha}","comments_url":"https://api.github.com/repos/mesonbuild/meson/comments{/number}","issue_comment_url":"https://api.github.com/repos/mesonbuild/meson/issues/comments{/number}","contents_url":"https://api.github.com/repos/mesonbuild/meson/contents/{+path}","compare_url":"https://api.github.com/repos/mesonbuild/meson/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mesonbuild/meson/merges","archive_url":"https://api.github.com/repos/mesonbuild/meson/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mesonbuild/meson/downloads","issues_url":"https://api.github.com/repos/mesonbuild/meson/issues{/number}","pulls_url":"https://api.github.com/repos/mesonbuild/meson/pulls{/number}","milestones_url":"https://api.github.com/repos/mesonbuild/meson/milestones{/number}","notifications_url":"https://api.github.com/repos/mesonbuild/meson/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mesonbuild/meson/labels{/name}","releases_url":"https://api.github.com/repos/mesonbuild/meson/releases{/id}","deployments_url":"https://api.github.com/repos/mesonbuild/meson/deployments","created_at":"2014-05-14T15:08:16Z","updated_at":"2016-09-24T20:37:42Z","pushed_at":"2016-09-25T06:59:42Z","git_url":"git://github.com/mesonbuild/meson.git","ssh_url":"git@github.com:mesonbuild/meson.git","clone_url":"https://github.com/mesonbuild/meson.git","svn_url":"https://github.com/mesonbuild/meson","homepage":null,"size":4073,"stargazers_count":525,"watchers_count":525,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":76,"mirror_url":null,"open_issues_count":137,"forks":76,"open_issues":137,"watchers":525,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mesonbuild/meson/pulls/811"},"html":{"href":"https://github.com/mesonbuild/meson/pull/811"},"issue":{"href":"https://api.github.com/repos/mesonbuild/meson/issues/811"},"comments":{"href":"https://api.github.com/repos/mesonbuild/meson/issues/811/comments"},"review_comments":{"href":"https://api.github.com/repos/mesonbuild/meson/pulls/811/comments"},"review_comment":{"href":"https://api.github.com/repos/mesonbuild/meson/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mesonbuild/meson/pulls/811/commits"},"statuses":{"href":"https://api.github.com/repos/mesonbuild/meson/statuses/8a7eaf450199db95084d43c035af87109d98c0f0"}}}}
{"actor":{"display_login":"QuLogic"}}