|
|
|
@ -394,13 +394,13 @@ class Variable:
|
|
|
|
|
if "list" in self.type:
|
|
|
|
|
if not type(value) in (list,tuple):
|
|
|
|
|
raise VariableError(
|
|
|
|
|
_("Value for variable '{varname}' may be {vartype} only").format(
|
|
|
|
|
_("The value for variable '{varname}' may be {vartype} only").format(
|
|
|
|
|
varname=self.label or self.name,
|
|
|
|
|
vartype="list"))
|
|
|
|
|
error = _("Values for variable '{varname}' may be {vartype} only")
|
|
|
|
|
else:
|
|
|
|
|
value = repeat(value,1)
|
|
|
|
|
error = _("Value for variable '{varname}' may be {vartype} only")
|
|
|
|
|
error = _("The value for variable '{varname}' may be {vartype} only")
|
|
|
|
|
if "string" in self.type:
|
|
|
|
|
value, valuecopy = tee(value,2)
|
|
|
|
|
for v in (x for x in valuecopy if not type(x) in (str,unicode)):
|
|
|
|
@ -425,7 +425,7 @@ class Variable:
|
|
|
|
|
error = _("Values for variable '{varname}' may "
|
|
|
|
|
"be {vartype}")
|
|
|
|
|
else:
|
|
|
|
|
error = _("Value for variable '{varname}' may be "
|
|
|
|
|
error = _("The value for variable '{varname}' may be "
|
|
|
|
|
"{vartype}")
|
|
|
|
|
self.raiseWrongChoice(name, tipChoice, val, error)
|
|
|
|
|
if "choice" in self.type and not "choiceedit" in self.type:
|
|
|
|
@ -589,7 +589,7 @@ class TableVariable(Variable):
|
|
|
|
|
if not type(value) in (list,tuple) or \
|
|
|
|
|
any(i for i in value if not type(i) in (tuple,list)):
|
|
|
|
|
raise VariableError(
|
|
|
|
|
_("Value for {varname} may be '{vartype}' only").format(
|
|
|
|
|
_("The value for {varname} may be '{vartype}' only").format(
|
|
|
|
|
varname=self.label or self.name,
|
|
|
|
|
vartype="table"))
|
|
|
|
|
# check len all entries
|
|
|
|
|