Skip to content
Browse files
Fixed some bugs found by codacy.
  • Loading branch information
felixfontein committed Dec 4, 2016
1 parent ca73d70 commit e775b0fe93891aa05b9e31a505fedc6b121aaaa7
Showing 2 changed files with 4 additions and 4 deletions.
@@ -106,9 +106,9 @@ def _do_classification(self, site):
utils.LOGGER.error('You have classifications that are too similar: {0} "{1}" and {2} "{3}" both result in output path {4} for language {5}.'.format(
taxonomy.classification_name, classification, other_classification_name, other_classification, path, lang))
utils.LOGGER.error('{0} {1} is used in: {1}'.format(
utils.LOGGER.error('{0} {1} is used in: {2}'.format(
taxonomy.classification_name.title(), classification, ', '.join(sorted([p.source_path for p in posts]))))
utils.LOGGER.error('{0} {1} is used in: {1}'.format(
utils.LOGGER.error('{0} {1} is used in: {2}'.format(
other_classification_name.title(), other_classification, ', '.join(sorted([p.source_path for p in other_posts]))))
quit = True
@@ -277,7 +277,7 @@ def _taxonomy_path(self, name, lang, taxonomy, dest_type='page'):
if not taxonomy.show_list_as_index and page is not None:
number_of_pages =[taxonomy.classification_name][lang].get(name)
if number_of_pages is None:
number_of_pages = self._compute_number_of_pages(self._get_filtered_list(name, lang),['INDEX_DISPLAY_POST_COUNT'])
number_of_pages = self._compute_number_of_pages(self._get_filtered_list(taxonomy, name, lang),['INDEX_DISPLAY_POST_COUNT'])[taxonomy.classification_name][lang][name] = number_of_pages
page_info = (page, number_of_pages)
return self._postprocess_path(path, lang, append_index=append_index, dest_type=dest_type, page_info=page_info)
@@ -277,7 +277,7 @@ def _generate_classification_page_as_list(self, taxonomy, classification, filter
yield task

if taxonomy.generate_atom_feeds_for_post_lists and['GENERATE_ATOM']:
yield self._generate_classification_page_as_list_atom(kind, taxonomy, classification, filtered_posts, context, kw, lang)
yield self._generate_classification_page_as_list_atom(taxonomy, classification, filtered_posts, context, kw, lang)

def _filter_list(self, post_list, lang):
"""Return only the posts which should be shown for this language."""

0 comments on commit e775b0f

Please sign in to comment.