diff --git a/generators/all_posts.py b/generators/all_posts.py index 0927425..ed3e38a 100644 --- a/generators/all_posts.py +++ b/generators/all_posts.py @@ -81,7 +81,7 @@ class AllPosts(Index): cur_posts.append(p) # Last month - if not month_elem is None and len(cur_posts) != 0: + if len(cur_posts) != 0: cur_posts.reverse() month_elem = self.createElement(dom, 'month') month_def = dom.createElement('month') @@ -129,7 +129,7 @@ class AllPosts(Index): cur_posts.append(p) # Last year - if not year_elem is None and len(cur_posts) != 0: + if len(cur_posts) != 0: year_elem = self.createElement(dom, 'year') year_def = dom.createElement('year') year_def.appendChild(dom.createTextNode(cur_posts[0].creation_date.strftime(date_format)))