From a70627db2b02359afe972540cc9abd7cce87c01f Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Wed, 14 Jan 2026 14:29:23 +0100 Subject: [PATCH] fix: issymlinkoption is not available for an optiondescription --- src/rougail/user_data.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/rougail/user_data.py b/src/rougail/user_data.py index ab969ca89..8f86b9b82 100644 --- a/src/rougail/user_data.py +++ b/src/rougail/user_data.py @@ -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}