display correct name in consistency
This commit is contained in:
@ -314,7 +314,7 @@ class Option(OnlyOption):
|
||||
msg = _('"{0}" is an invalid {1} for "{2}"'
|
||||
'').format(val,
|
||||
self._display_name,
|
||||
self.impl_get_display_name())
|
||||
option_bag.ori_option.impl_get_display_name())
|
||||
err_msg = '{0}'.format(err)
|
||||
if err_msg:
|
||||
msg += ', {}'.format(err_msg)
|
||||
@ -534,10 +534,7 @@ class Option(OnlyOption):
|
||||
if descr._cache_consistencies is None:
|
||||
return
|
||||
# get consistencies for this option
|
||||
if option_bag.option.impl_is_dynsymlinkoption():
|
||||
consistencies = descr._cache_consistencies.get(option_bag.option.impl_getopt())
|
||||
else:
|
||||
consistencies = descr._cache_consistencies.get(option_bag.option)
|
||||
consistencies = descr._cache_consistencies.get(option_bag.option)
|
||||
else:
|
||||
# is no context, get consistencies in option
|
||||
consistencies = option_bag.option.get_consistencies()
|
||||
@ -665,6 +662,13 @@ class Option(OnlyOption):
|
||||
cons_id,
|
||||
value,
|
||||
func):
|
||||
if option_bag.ori_option == current_option:
|
||||
# orig_option is current option
|
||||
# we have already value, so use it
|
||||
return value
|
||||
if option_bag.config_bag is undefined:
|
||||
#if no context get default value
|
||||
return current_option.impl_getdefault()
|
||||
if func in ALLOWED_CONST_LIST:
|
||||
index = None
|
||||
index_ = None
|
||||
@ -674,13 +678,6 @@ class Option(OnlyOption):
|
||||
else:
|
||||
index = option_bag.index
|
||||
index_ = index
|
||||
if option_bag.ori_option == current_option:
|
||||
# orig_option is current option
|
||||
# we have already value, so use it
|
||||
return value
|
||||
if option_bag.config_bag is undefined:
|
||||
#if no context get default value
|
||||
return current_option.impl_getdefault()
|
||||
#otherwise calculate value
|
||||
path = current_option.impl_getpath()
|
||||
coption_bag = OptionBag()
|
||||
|
Reference in New Issue
Block a user