From 3430c34988adc7e2b447a91aefe6669c2f45b06e Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Sun, 9 May 2010 23:51:29 +0000 Subject: [PATCH] Protection from crashing on unknown (new) markup svn: r15381 --- src/gen/plug/docbackend/docbackend.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gen/plug/docbackend/docbackend.py b/src/gen/plug/docbackend/docbackend.py index bc7fa5e94..88bf07f65 100644 --- a/src/gen/plug/docbackend/docbackend.py +++ b/src/gen/plug/docbackend/docbackend.py @@ -228,7 +228,9 @@ class DocBackend(object): typeval = int(s_tag.name) s_tagvalue = s_tag.value tag_name = None - if tagtype.STYLE_TYPE[typeval] == bool: + if typeval not in tagtype.STYLE_TYPE: + return None + elif tagtype.STYLE_TYPE[typeval] == bool: return self.STYLETAG_MARKUP[self.STYLETYPE_MAP[typeval]] elif tagtype.STYLE_TYPE[typeval] == str: tag_name = "%d %s" % (typeval, s_tagvalue)