bug fix (TypeError: object of type 'NoneType' has no len())

This commit is contained in:
Miroslav Stampar 2010-12-26 13:27:24 +00:00
parent 569e060aab
commit ceeb6374e8

View File

@ -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)