Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Handle link://category with an error
  • Loading branch information
Roberto Alsina committed Apr 19, 2017
1 parent 7113502 commit 741fb2e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions nikola/plugins/task/categories.py
Expand Up @@ -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 = ''
Expand Down

0 comments on commit 741fb2e

Please sign in to comment.