|
|
|
@ -32,8 +32,7 @@ import glob
|
|
|
|
|
import cl_overriding
|
|
|
|
|
|
|
|
|
|
from cl_utils import _error, _warning, _toUNICODE, getModeFile, removeDir,\
|
|
|
|
|
typeFile, scanDirectory, convertStrListDict, pathJoin,\
|
|
|
|
|
runOsCommand
|
|
|
|
|
typeFile, scanDirectory, convertStrListDict, pathJoin
|
|
|
|
|
|
|
|
|
|
import cl_lang
|
|
|
|
|
tr = cl_lang.lang()
|
|
|
|
@ -3126,20 +3125,6 @@ os_disk_install not found mount point '\' and '\%s'")%mountPoint)
|
|
|
|
|
textTemplateTmp[resS.end():]
|
|
|
|
|
return textTemplateTmp
|
|
|
|
|
|
|
|
|
|
def funcExec(self, funArgv, resS, localVars, textTemplateTmp):
|
|
|
|
|
"""Функция шаблона exec().
|
|
|
|
|
|
|
|
|
|
Выполняет первый аргумент, при ошибке результат "" иначе "1"
|
|
|
|
|
"""
|
|
|
|
|
retCode, outMess = runOsCommand(funArgv)
|
|
|
|
|
if retCode == 0:
|
|
|
|
|
replace = "1"
|
|
|
|
|
else:
|
|
|
|
|
replace = ""
|
|
|
|
|
textTemplateTmp = textTemplateTmp[:resS.start()] + replace +\
|
|
|
|
|
textTemplateTmp[resS.end():]
|
|
|
|
|
return textTemplateTmp
|
|
|
|
|
|
|
|
|
|
def printErrTemplate(self):
|
|
|
|
|
"""Печать ошибки при обработке функций шаблона"""
|
|
|
|
|
cl_overriding.printERROR(_("error in template %s")%self.nameTemplate)
|
|
|
|
|