From a8bf907a4ce82b8e6a48908936a3ec4edc845f7b Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Sat, 18 Jan 2020 06:46:56 -0600 Subject: Fix typeerror with adding values that aren't strings --- config_file/parsers/ini_parser.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'config_file') diff --git a/config_file/parsers/ini_parser.py b/config_file/parsers/ini_parser.py index 4e0922c..3c8f12f 100644 --- a/config_file/parsers/ini_parser.py +++ b/config_file/parsers/ini_parser.py @@ -60,6 +60,9 @@ class IniParser(BaseParser): if value is not None and not self.parsed_content.has_section(section): self.parsed_content.add_section(section) + if not isinstance(value, str): + value = str(value) + self.parsed_content.set(section, key, value) return True -- cgit v1.2.3