From ceeb6374e80a6f5e6bf0e54ae7e9761f555bdbe8 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Sun, 26 Dec 2010 13:27:24 +0000 Subject: [PATCH] bug fix (TypeError: object of type 'NoneType' has no len()) --- lib/core/common.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/core/common.py b/lib/core/common.py index 3715883de..069e04a25 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -1748,7 +1748,9 @@ def removeDynamicContent(page): if page: for item in kb.dynamicMarkings: prefix, suffix = item - if prefix is None: + if prefix is None and suffix is None: + continue + elif prefix is None: page = getCompiledRegex('(?s)^.+%s' % suffix).sub(suffix, page) elif suffix is None: page = getCompiledRegex('(?s)%s.+$' % prefix).sub(prefix, page)