From 890b8a1ada899a3684b0d8d73dba1072100e2b46 Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Tue, 12 Jun 2007 18:34:26 +0000 Subject: [PATCH] Fix potential exception in soup2html again. - Legacy-Id: 341 --- ietf/utils/soup2text.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ietf/utils/soup2text.py b/ietf/utils/soup2text.py index 75763649b..173f4d174 100755 --- a/ietf/utils/soup2text.py +++ b/ietf/utils/soup2text.py @@ -87,7 +87,7 @@ def render(node, encoding='latin-1', pre=False): blocks.append(child.text+"\n\n") node.is_block = True else: - if child.name in space_tags and not (words[-1] and words[-1][-1] in [" ", "\t", "\n"]): + if child.name in space_tags and not (words and words[-1] and words[-1][-1] in [" ", "\t", "\n"]): words.append(" ") words.append(child.text) else: