{"action":"created","comment":{"url":"https://api.github.com/repos/getnikola/nikola/pulls/comments/91735273","pull_request_review_id":12246701,"id":91735273,"diff_hunk":"@@ -2404,8 +2404,11 @@ def generic_index_renderer(self, lang, posts, indexes_title, template_name, cont\n             while posts:\n                 lists.append(posts[:kw[\"index_display_post_count\"]])\n                 posts = posts[kw[\"index_display_post_count\"]:]\n+            if not lists:\n+                lists.append([])\n         num_pages = len(lists)\n-        displayed_page_numbers = [utils.get_displayed_page_number(i, num_pages, self) for i in range(num_pages or 1)]\n+        assert num_pages >= 1","path":"nikola/nikola.py","position":8,"original_position":8,"commit_id":"6fad65a7c14893ff795297346d7de44b88b45201","original_commit_id":"6fad65a7c14893ff795297346d7de44b88b45201","user":{"login":"Kwpolska","id":327323,"avatar_url":"https://avatars.githubusercontent.com/u/327323?v=3","gravatar_id":"","url":"https://api.github.com/users/Kwpolska","html_url":"https://github.com/Kwpolska","followers_url":"https://api.github.com/users/Kwpolska/followers","following_url":"https://api.github.com/users/Kwpolska/following{/other_user}","gists_url":"https://api.github.com/users/Kwpolska/gists{/gist_id}","starred_url":"https://api.github.com/users/Kwpolska/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kwpolska/subscriptions","organizations_url":"https://api.github.com/users/Kwpolska/orgs","repos_url":"https://api.github.com/users/Kwpolska/repos","events_url":"https://api.github.com/users/Kwpolska/events{/privacy}","received_events_url":"https://api.github.com/users/Kwpolska/received_events","type":"User","site_admin":false},"body":"Assertions are ugly and can be disabled, use an `if` and raise an exception yourself.","created_at":"2016-12-09T15:25:49Z","updated_at":"2016-12-09T15:25:49Z","html_url":"https://github.com/getnikola/nikola/pull/2586#discussion_r91735273","pull_request_url":"https://api.github.com/repos/getnikola/nikola/pulls/2586","_links":{"self":{"href":"https://api.github.com/repos/getnikola/nikola/pulls/comments/91735273"},"html":{"href":"https://github.com/getnikola/nikola/pull/2586#discussion_r91735273"},"pull_request":{"href":"https://api.github.com/repos/getnikola/nikola/pulls/2586"}}},"pull_request":{"url":"https://api.github.com/repos/getnikola/nikola/pulls/2586","id":97068477,"html_url":"https://github.com/getnikola/nikola/pull/2586","diff_url":"https://github.com/getnikola/nikola/pull/2586.diff","patch_url":"https://github.com/getnikola/nikola/pull/2586.patch","issue_url":"https://api.github.com/repos/getnikola/nikola/issues/2586","number":2586,"state":"open","locked":false,"title":"Ensuring that generic_index_render always works fine with an empty post list","user":{"login":"felixfontein","id":5781356,"avatar_url":"https://avatars.githubusercontent.com/u/5781356?v=3","gravatar_id":"","url":"https://api.github.com/users/felixfontein","html_url":"https://github.com/felixfontein","followers_url":"https://api.github.com/users/felixfontein/followers","following_url":"https://api.github.com/users/felixfontein/following{/other_user}","gists_url":"https://api.github.com/users/felixfontein/gists{/gist_id}","starred_url":"https://api.github.com/users/felixfontein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/felixfontein/subscriptions","organizations_url":"https://api.github.com/users/felixfontein/orgs","repos_url":"https://api.github.com/users/felixfontein/repos","events_url":"https://api.github.com/users/felixfontein/events{/privacy}","received_events_url":"https://api.github.com/users/felixfontein/received_events","type":"User","site_admin":false},"body":"When `INDEXES_STATIC == False`, an empty post list results in no generated pages for `generic_index_renderer`. You can see this when building an empty site with `INDEXES_STATIC == False`: no `index.html` is generated.","created_at":"2016-12-08T06:52:08Z","updated_at":"2016-12-09T15:25:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8380883eb517d49c4cce0000d612209ce09bd47b","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/getnikola/nikola/pulls/2586/commits","review_comments_url":"https://api.github.com/repos/getnikola/nikola/pulls/2586/comments","review_comment_url":"https://api.github.com/repos/getnikola/nikola/pulls/comments{/number}","comments_url":"https://api.github.com/repos/getnikola/nikola/issues/2586/comments","statuses_url":"https://api.github.com/repos/getnikola/nikola/statuses/6fad65a7c14893ff795297346d7de44b88b45201","head":{"label":"getnikola:improving-zero-post-indexes","ref":"improving-zero-post-indexes","sha":"6fad65a7c14893ff795297346d7de44b88b45201","user":{"login":"getnikola","id":5413476,"avatar_url":"https://avatars.githubusercontent.com/u/5413476?v=3","gravatar_id":"","url":"https://api.github.com/users/getnikola","html_url":"https://github.com/getnikola","followers_url":"https://api.github.com/users/getnikola/followers","following_url":"https://api.github.com/users/getnikola/following{/other_user}","gists_url":"https://api.github.com/users/getnikola/gists{/gist_id}","starred_url":"https://api.github.com/users/getnikola/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/getnikola/subscriptions","organizations_url":"https://api.github.com/users/getnikola/orgs","repos_url":"https://api.github.com/users/getnikola/repos","events_url":"https://api.github.com/users/getnikola/events{/privacy}","received_events_url":"https://api.github.com/users/getnikola/received_events","type":"Organization","site_admin":false},"repo":{"id":4025121,"name":"nikola","full_name":"getnikola/nikola","owner":{"login":"getnikola","id":5413476,"avatar_url":"https://avatars.githubusercontent.com/u/5413476?v=3","gravatar_id":"","url":"https://api.github.com/users/getnikola","html_url":"https://github.com/getnikola","followers_url":"https://api.github.com/users/getnikola/followers","following_url":"https://api.github.com/users/getnikola/following{/other_user}","gists_url":"https://api.github.com/users/getnikola/gists{/gist_id}","starred_url":"https://api.github.com/users/getnikola/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/getnikola/subscriptions","organizations_url":"https://api.github.com/users/getnikola/orgs","repos_url":"https://api.github.com/users/getnikola/repos","events_url":"https://api.github.com/users/getnikola/events{/privacy}","received_events_url":"https://api.github.com/users/getnikola/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/getnikola/nikola","description":"A static website and blog generator","fork":false,"url":"https://api.github.com/repos/getnikola/nikola","forks_url":"https://api.github.com/repos/getnikola/nikola/forks","keys_url":"https://api.github.com/repos/getnikola/nikola/keys{/key_id}","collaborators_url":"https://api.github.com/repos/getnikola/nikola/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/getnikola/nikola/teams","hooks_url":"https://api.github.com/repos/getnikola/nikola/hooks","issue_events_url":"https://api.github.com/repos/getnikola/nikola/issues/events{/number}","events_url":"https://api.github.com/repos/getnikola/nikola/events","assignees_url":"https://api.github.com/repos/getnikola/nikola/assignees{/user}","branches_url":"https://api.github.com/repos/getnikola/nikola/branches{/branch}","tags_url":"https://api.github.com/repos/getnikola/nikola/tags","blobs_url":"https://api.github.com/repos/getnikola/nikola/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/getnikola/nikola/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/getnikola/nikola/git/refs{/sha}","trees_url":"https://api.github.com/repos/getnikola/nikola/git/trees{/sha}","statuses_url":"https://api.github.com/repos/getnikola/nikola/statuses/{sha}","languages_url":"https://api.github.com/repos/getnikola/nikola/languages","stargazers_url":"https://api.github.com/repos/getnikola/nikola/stargazers","contributors_url":"https://api.github.com/repos/getnikola/nikola/contributors","subscribers_url":"https://api.github.com/repos/getnikola/nikola/subscribers","subscription_url":"https://api.github.com/repos/getnikola/nikola/subscription","commits_url":"https://api.github.com/repos/getnikola/nikola/commits{/sha}","git_commits_url":"https://api.github.com/repos/getnikola/nikola/git/commits{/sha}","comments_url":"https://api.github.com/repos/getnikola/nikola/comments{/number}","issue_comment_url":"https://api.github.com/repos/getnikola/nikola/issues/comments{/number}","contents_url":"https://api.github.com/repos/getnikola/nikola/contents/{+path}","compare_url":"https://api.github.com/repos/getnikola/nikola/compare/{base}...{head}","merges_url":"https://api.github.com/repos/getnikola/nikola/merges","archive_url":"https://api.github.com/repos/getnikola/nikola/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/getnikola/nikola/downloads","issues_url":"https://api.github.com/repos/getnikola/nikola/issues{/number}","pulls_url":"https://api.github.com/repos/getnikola/nikola/pulls{/number}","milestones_url":"https://api.github.com/repos/getnikola/nikola/milestones{/number}","notifications_url":"https://api.github.com/repos/getnikola/nikola/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/getnikola/nikola/labels{/name}","releases_url":"https://api.github.com/repos/getnikola/nikola/releases{/id}","deployments_url":"https://api.github.com/repos/getnikola/nikola/deployments","created_at":"2012-04-14T13:53:22Z","updated_at":"2016-12-06T21:42:55Z","pushed_at":"2016-12-08T06:52:08Z","git_url":"git://github.com/getnikola/nikola.git","ssh_url":"git@github.com:getnikola/nikola.git","clone_url":"https://github.com/getnikola/nikola.git","svn_url":"https://github.com/getnikola/nikola","homepage":"https://getnikola.com/","size":29551,"stargazers_count":1123,"watchers_count":1123,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":287,"mirror_url":null,"open_issues_count":93,"forks":287,"open_issues":93,"watchers":1123,"default_branch":"master"}},"base":{"label":"getnikola:master","ref":"master","sha":"203877996e41d194199c2f864bddb13dc0e9a6dc","user":{"login":"getnikola","id":5413476,"avatar_url":"https://avatars.githubusercontent.com/u/5413476?v=3","gravatar_id":"","url":"https://api.github.com/users/getnikola","html_url":"https://github.com/getnikola","followers_url":"https://api.github.com/users/getnikola/followers","following_url":"https://api.github.com/users/getnikola/following{/other_user}","gists_url":"https://api.github.com/users/getnikola/gists{/gist_id}","starred_url":"https://api.github.com/users/getnikola/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/getnikola/subscriptions","organizations_url":"https://api.github.com/users/getnikola/orgs","repos_url":"https://api.github.com/users/getnikola/repos","events_url":"https://api.github.com/users/getnikola/events{/privacy}","received_events_url":"https://api.github.com/users/getnikola/received_events","type":"Organization","site_admin":false},"repo":{"id":4025121,"name":"nikola","full_name":"getnikola/nikola","owner":{"login":"getnikola","id":5413476,"avatar_url":"https://avatars.githubusercontent.com/u/5413476?v=3","gravatar_id":"","url":"https://api.github.com/users/getnikola","html_url":"https://github.com/getnikola","followers_url":"https://api.github.com/users/getnikola/followers","following_url":"https://api.github.com/users/getnikola/following{/other_user}","gists_url":"https://api.github.com/users/getnikola/gists{/gist_id}","starred_url":"https://api.github.com/users/getnikola/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/getnikola/subscriptions","organizations_url":"https://api.github.com/users/getnikola/orgs","repos_url":"https://api.github.com/users/getnikola/repos","events_url":"https://api.github.com/users/getnikola/events{/privacy}","received_events_url":"https://api.github.com/users/getnikola/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/getnikola/nikola","description":"A static website and blog generator","fork":false,"url":"https://api.github.com/repos/getnikola/nikola","forks_url":"https://api.github.com/repos/getnikola/nikola/forks","keys_url":"https://api.github.com/repos/getnikola/nikola/keys{/key_id}","collaborators_url":"https://api.github.com/repos/getnikola/nikola/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/getnikola/nikola/teams","hooks_url":"https://api.github.com/repos/getnikola/nikola/hooks","issue_events_url":"https://api.github.com/repos/getnikola/nikola/issues/events{/number}","events_url":"https://api.github.com/repos/getnikola/nikola/events","assignees_url":"https://api.github.com/repos/getnikola/nikola/assignees{/user}","branches_url":"https://api.github.com/repos/getnikola/nikola/branches{/branch}","tags_url":"https://api.github.com/repos/getnikola/nikola/tags","blobs_url":"https://api.github.com/repos/getnikola/nikola/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/getnikola/nikola/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/getnikola/nikola/git/refs{/sha}","trees_url":"https://api.github.com/repos/getnikola/nikola/git/trees{/sha}","statuses_url":"https://api.github.com/repos/getnikola/nikola/statuses/{sha}","languages_url":"https://api.github.com/repos/getnikola/nikola/languages","stargazers_url":"https://api.github.com/repos/getnikola/nikola/stargazers","contributors_url":"https://api.github.com/repos/getnikola/nikola/contributors","subscribers_url":"https://api.github.com/repos/getnikola/nikola/subscribers","subscription_url":"https://api.github.com/repos/getnikola/nikola/subscription","commits_url":"https://api.github.com/repos/getnikola/nikola/commits{/sha}","git_commits_url":"https://api.github.com/repos/getnikola/nikola/git/commits{/sha}","comments_url":"https://api.github.com/repos/getnikola/nikola/comments{/number}","issue_comment_url":"https://api.github.com/repos/getnikola/nikola/issues/comments{/number}","contents_url":"https://api.github.com/repos/getnikola/nikola/contents/{+path}","compare_url":"https://api.github.com/repos/getnikola/nikola/compare/{base}...{head}","merges_url":"https://api.github.com/repos/getnikola/nikola/merges","archive_url":"https://api.github.com/repos/getnikola/nikola/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/getnikola/nikola/downloads","issues_url":"https://api.github.com/repos/getnikola/nikola/issues{/number}","pulls_url":"https://api.github.com/repos/getnikola/nikola/pulls{/number}","milestones_url":"https://api.github.com/repos/getnikola/nikola/milestones{/number}","notifications_url":"https://api.github.com/repos/getnikola/nikola/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/getnikola/nikola/labels{/name}","releases_url":"https://api.github.com/repos/getnikola/nikola/releases{/id}","deployments_url":"https://api.github.com/repos/getnikola/nikola/deployments","created_at":"2012-04-14T13:53:22Z","updated_at":"2016-12-06T21:42:55Z","pushed_at":"2016-12-08T06:52:08Z","git_url":"git://github.com/getnikola/nikola.git","ssh_url":"git@github.com:getnikola/nikola.git","clone_url":"https://github.com/getnikola/nikola.git","svn_url":"https://github.com/getnikola/nikola","homepage":"https://getnikola.com/","size":29551,"stargazers_count":1123,"watchers_count":1123,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":287,"mirror_url":null,"open_issues_count":93,"forks":287,"open_issues":93,"watchers":1123,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/getnikola/nikola/pulls/2586"},"html":{"href":"https://github.com/getnikola/nikola/pull/2586"},"issue":{"href":"https://api.github.com/repos/getnikola/nikola/issues/2586"},"comments":{"href":"https://api.github.com/repos/getnikola/nikola/issues/2586/comments"},"review_comments":{"href":"https://api.github.com/repos/getnikola/nikola/pulls/2586/comments"},"review_comment":{"href":"https://api.github.com/repos/getnikola/nikola/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/getnikola/nikola/pulls/2586/commits"},"statuses":{"href":"https://api.github.com/repos/getnikola/nikola/statuses/6fad65a7c14893ff795297346d7de44b88b45201"}}}}
{"actor":{"display_login":"Kwpolska"}}