enhancement(src/rougail/annotator/variable.py) add variable name when test nil value
This commit is contained in:
parent
df7f33e786
commit
61569f3772
1 changed files with 1 additions and 1 deletions
|
@ -164,7 +164,7 @@ class Annotator(Walk): # pylint: disable=R0903
|
||||||
if hasattr(variable, 'value'):
|
if hasattr(variable, 'value'):
|
||||||
for idx, value in enumerate(variable.value):
|
for idx, value in enumerate(variable.value):
|
||||||
if not hasattr(value, 'name') and not hasattr(value, 'type'):
|
if not hasattr(value, 'name') and not hasattr(value, 'type'):
|
||||||
msg = 'value without value, if you want the value None, set value type to nil'
|
msg = f'variable "{variable.name}" has a value without text, if you want the value None, set value type to nil'
|
||||||
raise DictConsistencyError(msg, 95, value.xmlfiles)
|
raise DictConsistencyError(msg, 95, value.xmlfiles)
|
||||||
if not hasattr(value, 'type'):
|
if not hasattr(value, 'type'):
|
||||||
value.type = variable.type
|
value.type = variable.type
|
||||||
|
|
Loading…
Reference in a new issue