better error message
This commit is contained in:
parent
a3261abc94
commit
32b24c2978
1 changed files with 3 additions and 7 deletions
|
@ -111,13 +111,9 @@ class DynOptionDescription(OptionDescription):
|
||||||
self.impl_get_display_name()))
|
self.impl_get_display_name()))
|
||||||
else:
|
else:
|
||||||
values_.append(val)
|
values_.append(val)
|
||||||
if __debug__:
|
if __debug__ and len(values_) > len(set(values_)):
|
||||||
if len(values_) > len(set(values_)):
|
raise ValueError(_(f'DynOptionDescription "{self._name}" suffixes return a list with '
|
||||||
extra_values = values_.copy()
|
f'same values "{values_}"'''))
|
||||||
for val in set(values_):
|
|
||||||
extra_values.remove(val)
|
|
||||||
raise ValueError(_('DynOptionDescription suffixes return a list with '
|
|
||||||
f'multiple value "{extra_values}"'''))
|
|
||||||
return values_
|
return values_
|
||||||
|
|
||||||
def impl_is_dynoptiondescription(self) -> bool:
|
def impl_is_dynoptiondescription(self) -> bool:
|
||||||
|
|
Loading…
Reference in a new issue