mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-26 09:56:13 +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:
parent
e05e097e03
commit
4b1e2343d8
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user