Browse Source

Bugfix

develop
Самоукин Алексей 12 years ago
parent
commit
c38e4b6e6c
  1. 4
      pym/cl_template.py

4
pym/cl_template.py

@ -2824,7 +2824,7 @@ class templateFunction(_error, _shareTemplate, _shareTermsFunction):
value = str(self.objVar.Get(nameVar))
except:
self.printErrTemplate()
print _("not found template variable %s")%str(nameVar)
print _("not found template variable '%s'")%str(nameVar)
cl_overriding.exit(1)
replace = value.replace(old,new)
textTemplateTmp = textTemplateTmp[:resS.start()] + replace +\
@ -2904,6 +2904,8 @@ class templateFunction(_error, _shareTemplate, _shareTermsFunction):
localVars[nameLocalVar] = value
else:
replace = value
elif nameLocalVar:
localVars[nameLocalVar] = ""
textTemplateTmp = textTemplateTmp[:resS.start()] + replace +\
textTemplateTmp[resS.end():]
return textTemplateTmp

Loading…
Cancel
Save