Browse Source

Bugfix

develop
Самоукин Алексей 12 years ago
parent
commit
b749a35fa6
  1. 10
      pym/cl_datavars.py
  2. 3
      pym/cl_template.py

10
pym/cl_datavars.py

@ -338,8 +338,14 @@ storage of variables templates")%location
vname - имя переменной
"""
if hasattr(self, vname):
return getattr(self, vname).service.lower()
if not hasattr(self, vname):
try:
self.Get(vname)
except self.DataVarsError, e:
print _("Not found template variable %s")%vname
print e
cl_overriding.exit(1)
return getattr(self, vname).service.lower()
def __writeVarValue(self, vname, val, location, header):
'''Записать значение в calculate.ini

3
pym/cl_template.py

@ -4497,6 +4497,9 @@ class iniParser(_error, templateFormat):
def getLastNode(self, objIni, xmlBody, strHeader, formatPlasma):
"""Ищет область в XML в которой область с переменными"""
flagFound = True
if not strHeader:
flagFound = False
return flagFound,xmlBody
lenStrHeader = len(strHeader)
if formatPlasma and lenStrHeader>0:
xmlAreas = [xmlBody]

Loading…
Cancel
Save