bugfix regular expression accepts string and not list

bzr revid: nch@tinyerp.com-20090429105718-9nuzjh9foosowe8y
This commit is contained in:
Naresh Choksy 2009-04-29 16:27:18 +05:30
parent 740bb829f9
commit 315dc765bf
1 changed files with 2 additions and 2 deletions

View File

@ -32,7 +32,7 @@ class report(object):
return txt.group(0)
def _sub1(txt):
if len(txt.group(4)) > 1:
return []
return " "
match = rml_parents
if type in ['odt','sxw']:
match = sxw_parents
@ -44,7 +44,7 @@ class report(object):
n.set('rml_loop', txt.group(2))
return '[['+txt.group(1)+"''"+txt.group(4)+']]'
t = _regex1.sub(_sub1, node.text)
if t == []:
if t == " ":
t = _regex11.sub(_sub1, node.text)
t = _regex3.sub(_sub3, t)
node.text = _regex2.sub(_sub2, t)