From b29b9fc0453a264f317a5e85cfd4898cca01d2b3 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, 9 Sep 2010 17:28:20 +0400 Subject: [PATCH] Checking a value of the variable 'cl-name' for updated configurations files. --- pym/cl_apply_template.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pym/cl_apply_template.py b/pym/cl_apply_template.py index b2edede..2b86a41 100644 --- a/pym/cl_apply_template.py +++ b/pym/cl_apply_template.py @@ -24,6 +24,7 @@ __app__ = cl_install.__app__ from cl_datavars import DataVars from cl_template import template, templateClt from cl_print import color_print +import cl_overriding from cl_lang import lang lang().setLanguage(sys.modules[__name__]) @@ -135,6 +136,7 @@ subdirectories %s")%', '.join(dirsTemplates)) dictPakkages = {} oldPymPath = "" listIndex = [] + clTempl = False for sectName in sectionsWork: realPath = "/usr/lib/calculate-2.2/calculate-%s"%sectName pymPath = os.path.join(realPath,"pym") @@ -166,7 +168,8 @@ subdirectories %s")%', '.join(dirsTemplates)) clVars.Set("cl_action", "merge" ,True) # будут применены все шаблоны .clt (cltFilter=False) # и обычные шаблоны - clTempl = template(clVars, cltFilter=False) + clTempl = template(clVars, cltFilter=False, + printWarning=False) error = None try: if location=="clt": @@ -207,4 +210,8 @@ subdirectories %s")%', '.join(dirsTemplates)) if nameFile[:1] != "/": nameFile = "/" + nameFile self.printWARNING(" "*5 + nameFile) + if clTempl and clTempl.getWarning(): + cl_overriding.printSUCCESS("") + for warn in clTempl.getWarning().split("\n"): + self.printWARNING(warn) return True