Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/mwlib
diff options
context:
space:
mode:
authorChris Ball <cjb@laptop.org>2008-05-25 04:44:54 (GMT)
committer Chris Ball <cjb@laptop.org>2008-05-25 04:44:54 (GMT)
commit37305c1732fdc3ec711c5ae13d7526a2b6062015 (patch)
tree1471b5b537f41f0f66ac1ef4ca68a70fa6457d9e /mwlib
parent4af86957f2ebecc52d08d3ce67c71905e65572b8 (diff)
Fix crash on empty template title expansion.
Diffstat (limited to 'mwlib')
-rwxr-xr-xmwlib/expander.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/mwlib/expander.py b/mwlib/expander.py
index 5e92105..c45a4ea 100755
--- a/mwlib/expander.py
+++ b/mwlib/expander.py
@@ -399,13 +399,14 @@ class Expander(object):
log.info("including article")
raw = self.db.getRawArticle(name[1:])
else:
- name = name[0].capitalize() + name[1:]
- name = "Plantilla:" + name
- try:
- return self.parsedTemplateCache[name]
- except KeyError:
- pass
-
+ if len(name) > 1:
+ name = name[0].capitalize() + name[1:]
+ name = "Plantilla:" + name
+ try:
+ return self.parsedTemplateCache[name]
+ except KeyError:
+ pass
+
# Check to see if this is a template in our blacklist --
# one that we don't want to bother rendering.
if name in self.blacklist: