From c38e4b6e6ca5b7bdcef684cfd58fc5ce590f8b6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D0=B0=D0=BC=D0=BE=D1=83=D0=BA=D0=B8=D0=BD=20=D0=90?= =?UTF-8?q?=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9?= Date: Thu, 10 Jun 2010 10:38:19 +0400 Subject: [PATCH] Bugfix --- pym/cl_template.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pym/cl_template.py b/pym/cl_template.py index 50fc1d7..d067769 100644 --- a/pym/cl_template.py +++ b/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