[MERGE] trml2pdf: don't reassign a reused node.text value (additional fix)
lp bug: https://launchpad.net/bugs/640677 fixed bzr revid: odo@openerp.com-20110919233407-gdna8j4gll0lm4um
This commit is contained in:
commit
54078c6394
|
@ -447,14 +447,14 @@ class _rml_canvas(object):
|
|||
self._logger.debug("Image %s used", node.get('name'))
|
||||
s = StringIO(image_data)
|
||||
else:
|
||||
newtext = node.text
|
||||
if self.localcontext:
|
||||
res = utils._regex.findall(node.text)
|
||||
res = utils._regex.findall(newtext)
|
||||
for key in res:
|
||||
newtext = eval(key, {}, self.localcontext)
|
||||
node.text = newtext or ''
|
||||
newtext = eval(key, {}, self.localcontext) or ''
|
||||
image_data = None
|
||||
if node.text:
|
||||
image_data = base64.decodestring(node.text)
|
||||
if newtext:
|
||||
image_data = base64.decodestring(newtext)
|
||||
if image_data:
|
||||
s = StringIO(image_data)
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue