Skip to content
Permalink
Browse files
Handle link://category with an error
  • Loading branch information
ralsina committed Apr 19, 2017
1 parent 7113502 commit 741fb2e69ee27292c086c80afd9409eb32c98fd0
Showing with 3 additions and 0 deletions.
  1. +3 −0 nikola/plugins/task/categories.py
@@ -116,6 +116,9 @@ def slugify_tag_name(self, name, lang):

def slugify_category_name(self, path, lang):
"""Slugify a category name."""
if not path: # Probably used link://category
utils.LOGGER.error('Invalid link to a category without passing a category name. Probably meant to use category_index?')
raise ValueError()
if lang is None: # TODO: remove in v8
utils.LOGGER.warn("ClassifyCategories.slugify_category_name() called without language!")
lang = ''

0 comments on commit 741fb2e

Please sign in to comment.