From 74abc59dca3a79e4228d60e84e3ef031c19a2bee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Wed, 17 Apr 2019 15:50:23 +0100 Subject: save_order, save: config option is not always a string MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maxime “pep” Buquet --- poezio/core/commands.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'poezio/core') diff --git a/poezio/core/commands.py b/poezio/core/commands.py index 34ac96b3..cc2869a0 100644 --- a/poezio/core/commands.py +++ b/poezio/core/commands.py @@ -614,7 +614,8 @@ class CommandCore: theme.COLOR_INFORMATION_TEXT), }) for option_name, option_value in section.items(): - if 'password' in option_name and 'eval_password' not in option_name: + if isinstance(option_name, str) and \ + 'password' in option_name and 'eval_password' not in option_name: option_value = '********' lines.append( '%s\x19%s}=\x19o%s' % @@ -624,7 +625,8 @@ class CommandCore: elif len(args) == 1: option = args[0] value = config.get(option) - if 'password' in option and 'eval_password' not in option and value is not None: + if isinstance(option, str) and \ + 'password' in option and 'eval_password' not in option and value is not None: value = '********' if value is None and '=' in option: args = option.split('=', 1) -- cgit v1.2.3