Skip to content

Commit 741fb2e

Browse files
author
Roberto Alsina
committedApr 19, 2017
Handle link://category with an error
1 parent 7113502 commit 741fb2e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed
 

‎nikola/plugins/task/categories.py

+3
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,9 @@ def slugify_tag_name(self, name, lang):
116116

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

0 commit comments

Comments
 (0)
Please sign in to comment.