diff options
| author | Eugene Triguba <eugenetriguba@gmail.com> | 2020-01-18 06:46:56 -0600 |
|---|---|---|
| committer | Eugene Triguba <eugenetriguba@gmail.com> | 2020-01-18 06:46:56 -0600 |
| commit | a8bf907a4ce82b8e6a48908936a3ec4edc845f7b (patch) | |
| tree | 5aa466f8efda97c87b1e94254c802b4bad13d352 /config_file | |
| parent | Bump version: 0.3.1 → 0.3.2 (diff) | |
| download | config-file-a8bf907a4ce82b8e6a48908936a3ec4edc845f7b.zip | |
Fix typeerror with adding values that aren't strings
Diffstat (limited to 'config_file')
| -rw-r--r-- | config_file/parsers/ini_parser.py | 3 |
1 files changed, 3 insertions, 0 deletions
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 |