|
|
|
@ -171,7 +171,7 @@ class _terms(_error):
|
|
|
|
|
except self.objVar.DataVarsError, e:
|
|
|
|
|
print textError
|
|
|
|
|
print e
|
|
|
|
|
exit(1)
|
|
|
|
|
cl_base.exit(1)
|
|
|
|
|
# Cравниваем номера версий
|
|
|
|
|
if "_ver" in vals[0] or \
|
|
|
|
|
(flagFunction and "pkg" == searchFunct.group(1)) or\
|
|
|
|
@ -2162,7 +2162,7 @@ class profile(_file, _terms,xmlShare):
|
|
|
|
|
except self.objVar.DataVarsError, e:
|
|
|
|
|
print _("error in profile %s")%nameProfile
|
|
|
|
|
print e
|
|
|
|
|
exit(1)
|
|
|
|
|
cl_base.exit(1)
|
|
|
|
|
textProfileTmp = textProfileTmp.replace(mark, varValue)
|
|
|
|
|
resS = self._reVar.search(textProfileTmp)
|
|
|
|
|
return textProfileTmp
|
|
|
|
@ -2195,19 +2195,19 @@ class profile(_file, _terms,xmlShare):
|
|
|
|
|
except:
|
|
|
|
|
print _("error in profile %s")%nameProfile
|
|
|
|
|
print _("error var %s not int")%str(strNum)
|
|
|
|
|
exit(1)
|
|
|
|
|
cl_base.exit(1)
|
|
|
|
|
else:
|
|
|
|
|
print _("error in profile %s")%nameProfile
|
|
|
|
|
print _("error local var %s not defined")\
|
|
|
|
|
%str(strNum)
|
|
|
|
|
exit(1)
|
|
|
|
|
cl_base.exit(1)
|
|
|
|
|
if minus:
|
|
|
|
|
num =-num
|
|
|
|
|
strNumers.append(num)
|
|
|
|
|
return sum(strNumers)
|
|
|
|
|
print _("error in profile %s")%nameProfile
|
|
|
|
|
print _("error profile term %s, incorrect data")%str(term)
|
|
|
|
|
exit(1)
|
|
|
|
|
cl_base.exit(1)
|
|
|
|
|
|
|
|
|
|
def multAndDiv(term,sNum,sMD,localVars):
|
|
|
|
|
"""локальная функция для умножения и деления"""
|
|
|
|
@ -2255,7 +2255,7 @@ class profile(_file, _terms,xmlShare):
|
|
|
|
|
else:
|
|
|
|
|
print _("error in profile %s")%nameProfile
|
|
|
|
|
print _("error profile term %s")%str(funTxt)
|
|
|
|
|
exit(1)
|
|
|
|
|
cl_base.exit(1)
|
|
|
|
|
return textProfileTmp
|
|
|
|
|
|
|
|
|
|
def funcLoad(funTxt,resS,textProfileTmp):
|
|
|
|
@ -2269,14 +2269,14 @@ class profile(_file, _terms,xmlShare):
|
|
|
|
|
len(terms)>2:
|
|
|
|
|
print _("error in profile %s")%nameProfile
|
|
|
|
|
print _("error profile term %s")%str(funTxt)
|
|
|
|
|
exit(1)
|
|
|
|
|
cl_base.exit(1)
|
|
|
|
|
if len(terms) == 2:
|
|
|
|
|
if not terms[0] in ["ver","num","char","key"]:
|
|
|
|
|
print _("error in profile %s")%nameProfile
|
|
|
|
|
print _("error profile term %s")%str(funTxt)
|
|
|
|
|
print _("first argument function is not 'ver' or 'num' or\
|
|
|
|
|
'char'")
|
|
|
|
|
exit(1)
|
|
|
|
|
cl_base.exit(1)
|
|
|
|
|
if len(terms) == 1:
|
|
|
|
|
fileName = terms[0].strip()
|
|
|
|
|
if fileName[0] != "/":
|
|
|
|
@ -2369,20 +2369,20 @@ class profile(_file, _terms,xmlShare):
|
|
|
|
|
len(terms)!=2:
|
|
|
|
|
print _("error in profile %s")%nameProfile
|
|
|
|
|
print _("error profile term %s")%str(funTxt)
|
|
|
|
|
exit(1)
|
|
|
|
|
cl_base.exit(1)
|
|
|
|
|
fArgvNames = ['num','pas']
|
|
|
|
|
if not terms[0] in fArgvNames:
|
|
|
|
|
print _("error in profile %s")%nameProfile
|
|
|
|
|
print _("error profile term %s")%str(funTxt)
|
|
|
|
|
print _("first argument function is not 'num' or 'pas'")
|
|
|
|
|
exit(1)
|
|
|
|
|
cl_base.exit(1)
|
|
|
|
|
try:
|
|
|
|
|
lenStr = int(terms[1])
|
|
|
|
|
except:
|
|
|
|
|
print _("error in profile %s")%nameProfile
|
|
|
|
|
print _("error profile term %s")%str(funTxt)
|
|
|
|
|
print _("two argument function is not number")
|
|
|
|
|
exit(1)
|
|
|
|
|
cl_base.exit(1)
|
|
|
|
|
if terms[0] == fArgvNames[0]:
|
|
|
|
|
replace=''.join([random.choice(string.digits)\
|
|
|
|
|
for i in xrange(lenStr)])
|
|
|
|
@ -2392,7 +2392,7 @@ class profile(_file, _terms,xmlShare):
|
|
|
|
|
else:
|
|
|
|
|
print _("error in profile %s")%nameProfile
|
|
|
|
|
print _("error profile term %s")%str(funTxt)
|
|
|
|
|
exit(1)
|
|
|
|
|
cl_base.exit(1)
|
|
|
|
|
textProfileTmp = textProfileTmp[:resS.start()] + replace +\
|
|
|
|
|
textProfileTmp[resS.end():]
|
|
|
|
|
return textProfileTmp
|
|
|
|
@ -2412,20 +2412,20 @@ class profile(_file, _terms,xmlShare):
|
|
|
|
|
(len(terms)==2 and not terms[1].strip()) or len(terms)!=2:
|
|
|
|
|
print _("error in profile %s")%nameProfile
|
|
|
|
|
print _("error profile term %s")%str(funTxt)
|
|
|
|
|
exit(1)
|
|
|
|
|
cl_base.exit(1)
|
|
|
|
|
fArgvNames = ['upper','lower','capitalize']
|
|
|
|
|
if not terms[0] in fArgvNames:
|
|
|
|
|
print _("error in profile %s")%nameProfile
|
|
|
|
|
print _("error profile term %s")%str(funTxt)
|
|
|
|
|
print _("first argument function is not 'upper' or 'lower' or\
|
|
|
|
|
'capitalize'")
|
|
|
|
|
exit(1)
|
|
|
|
|
cl_base.exit(1)
|
|
|
|
|
try:
|
|
|
|
|
strValue = str(self.objVar.Get(terms[1]))
|
|
|
|
|
except:
|
|
|
|
|
print _("error in profile %s")%nameProfile
|
|
|
|
|
print _("error var %s not found")%str(terms[1])
|
|
|
|
|
exit(1)
|
|
|
|
|
cl_base.exit(1)
|
|
|
|
|
replace = ""
|
|
|
|
|
strValue = self._toUNICODE(strValue)
|
|
|
|
|
if terms[0] == 'upper':
|
|
|
|
|