From 5503b2999ec6fad4be8c23307309402755d11db6 Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Tue, 8 Nov 2011 00:40:23 -0500 Subject: [PATCH] Fix page title thing again. --- bot/wiki/category.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bot/wiki/category.py b/bot/wiki/category.py index d636b02..c1a9301 100644 --- a/bot/wiki/category.py +++ b/bot/wiki/category.py @@ -46,7 +46,10 @@ class Category(Page): for row in result: body = row[0].replace("_", " ") namespace = self._site.namespace_id_to_name(row[1]) - title = ":".join((str(namespace), body)) + if namespace: + title = ":".join((str(namespace), body)) + else: # Avoid doing a silly (albeit valid) ":Pagename" thing + title = body members.append((title, row[2])) return members