Skip to content

Commit

Permalink
Fix #2489 -- don’t crash if a post list has no posts
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Aug 31, 2016
1 parent 8434d32 commit 9122f1f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitignore
Expand Up @@ -24,3 +24,6 @@ __pycache__/

# GitHub token
.pypt/gh-token

#
.DS_Store
5 changes: 5 additions & 0 deletions CHANGES.txt
@@ -1,6 +1,11 @@
New in master
=============

Bugfixes
--------

* Don’t crash if a post list has no posts (Issue #2489)

Features
--------

Expand Down
2 changes: 1 addition & 1 deletion nikola/plugins/compile/rest/post_list.py
Expand Up @@ -284,7 +284,7 @@ def _do_post_list(start=None, stop=None, reverse=False, tags=None, categories=No
posts += [post]

if not posts:
return ''
return '', []

template_deps = site.template_system.template_deps(template)
if state:
Expand Down

0 comments on commit 9122f1f

Please sign in to comment.