fix: issymlinkoption is not available for an optiondescription
This commit is contained in:
parent
a593fa3d35
commit
a70627db2b
1 changed files with 9 additions and 9 deletions
|
|
@ -307,7 +307,7 @@ class UserData:
|
|||
if isinstance(value, list):
|
||||
value = display_list(value, add_quote=True)
|
||||
else:
|
||||
value = '"' + value + '"'
|
||||
value = '"' + str(value) + '"'
|
||||
return value
|
||||
|
||||
def _populate_error_warnings(self):
|
||||
|
|
@ -318,14 +318,6 @@ class UserData:
|
|||
option = self.config.forcepermissive.option(path)
|
||||
else:
|
||||
option = self.config.option(path)
|
||||
if option.issymlinkoption():
|
||||
err = _('it\'s a symlink option so we cannot set the value {0}').format(self._display_value(option, value))
|
||||
if self.invalid_user_data_error:
|
||||
msg = _('{0}, it has been loading from {1}').format(err, options["source"])
|
||||
else:
|
||||
msg = _('{0}, it will be ignored when loading from {1}').format(err, options["source"])
|
||||
self.unknowns.append({msg: option._subconfig})
|
||||
continue
|
||||
try:
|
||||
if option.isoptiondescription():
|
||||
if value:
|
||||
|
|
@ -343,6 +335,14 @@ class UserData:
|
|||
): option._subconfig}
|
||||
)
|
||||
continue
|
||||
if option.issymlinkoption():
|
||||
err = _('it\'s a symlink option so we cannot set the value {0}').format(self._display_value(option, value))
|
||||
if self.invalid_user_data_error:
|
||||
msg = _('{0}, it has been loading from {1}').format(err, options["source"])
|
||||
else:
|
||||
msg = _('{0}, it will be ignored when loading from {1}').format(err, options["source"])
|
||||
self.unknowns.append({msg: option._subconfig})
|
||||
continue
|
||||
except ConfigError as err:
|
||||
self.invalids.append({
|
||||
_("{0}, it has been loaded from {1}").format(err, options["source"]): option._subconfig}
|
||||
|
|
|
|||
Loading…
Reference in a new issue