Skip to content

Commit

Permalink
Fix “issue” (not really) found by Codacy
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Dec 20, 2016
1 parent bac9401 commit 0e8b8ce
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion nikola/plugins/task/archive.py
Expand Up @@ -189,10 +189,12 @@ def provide_context_and_uptodate(self, classification, lang, node=None):
kw.update(context)
return context, kw

def postprocess_posts_per_classification(self, posts_per_section_per_language, flat_hierarchy_per_lang, hierarchy_lookup_per_lang):
def postprocess_posts_per_classification(self, posts_per_section_per_language, flat_hierarchy_per_lang=None, hierarchy_lookup_per_lang=None):
"""Rearrange, modify or otherwise use the list of posts per classification and per language."""
# Build a lookup table for archive navigation, if we’ll need one.
if self.site.config['CREATE_ARCHIVE_NAVIGATION']:
if flat_hierarchy_per_lang is None:
raise ValueError('Archives need flat_hierarchy_per_lang')
self.archive_navigation = {}
for lang, flat_hierarchy in flat_hierarchy_per_lang.items():
self.archive_navigation[lang] = defaultdict(list)
Expand Down

0 comments on commit 0e8b8ce

Please sign in to comment.