|
|
|
@ -56,6 +56,9 @@ class CriticalError(Exception):
|
|
|
|
|
class DataVarsError(Exception):
|
|
|
|
|
"""Exception of getting variable values"""
|
|
|
|
|
|
|
|
|
|
class ImportModuleDataVarsError(DataVarsError):
|
|
|
|
|
"""Ошибка импортирования модуля"""
|
|
|
|
|
|
|
|
|
|
class VariableError(Exception):
|
|
|
|
|
"""Exception of sended by Variable"""
|
|
|
|
|
|
|
|
|
@ -1137,7 +1140,7 @@ class DataVars(SimpleDataVars):
|
|
|
|
|
raise DataVarsError(_("Variable %s not found")%varname)
|
|
|
|
|
|
|
|
|
|
def raiseModuleError(self,module,error,*args,**kwargs):
|
|
|
|
|
raise DataVarsError("\n".join([
|
|
|
|
|
raise ImportModuleDataVarsError("\n".join([
|
|
|
|
|
_("Failed to import module %s")%module,
|
|
|
|
|
_("error") + ": " +str(error)]))
|
|
|
|
|
|
|
|
|
@ -1318,7 +1321,12 @@ class DataVars(SimpleDataVars):
|
|
|
|
|
section,varname = self.splitVarname(varname)
|
|
|
|
|
if not varname in self.loadVariables or \
|
|
|
|
|
not section in self.importedModules:
|
|
|
|
|
self.loadVariable(varname,section=section)
|
|
|
|
|
try:
|
|
|
|
|
self.loadVariable(varname,section=section)
|
|
|
|
|
except ImportModuleDataVarsError:
|
|
|
|
|
if varname.startswith("ac_"):
|
|
|
|
|
return ""
|
|
|
|
|
raise
|
|
|
|
|
varObj = self.loadVariables[varname]
|
|
|
|
|
|
|
|
|
|
# check section
|
|
|
|
|