1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-12-27 02:16:12 +01:00

fix TypeError with python3.7 configparser

configparser.py in python3.7 does not take None Type.
We override the _validate_value_types method in
OscConfigParser class to disable this check.
This commit is contained in:
lethliel 2019-09-17 11:04:13 +02:00 committed by lethliel
parent e05e097e03
commit 4b1e2343d8

View File

@ -355,4 +355,10 @@ class OscConfigParser(configparser.SafeConfigParser):
ret.append(str(line))
return '\n'.join(ret)
def _validate_value_types(self, section="", option="", value=""):
if not isinstance(section, str):
raise TypeError("section names must be strings")
if not isinstance(option, str):
raise TypeError("option keys must be strings")
# vim: sw=4 et