1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-09-21 17:56:19 +02:00

Merge branch 'fix_initial_setup' of https://github.com/lethliel/osc

Support None as a default option value in the config parser. Using
None is ok for us because whenever we serialize the config the corresponding
options (user, passx (unused), password) will have a non-None value.

Note: _validate_value_types in OscConfigParser is only called by
recent SafeConfigParser implementations.
This commit is contained in:
Marcus Huewe 2019-09-17 13:47:38 +02:00
commit cb5a42ffea

View File

@ -355,4 +355,10 @@ class OscConfigParser(configparser.SafeConfigParser):
ret.append(str(line)) ret.append(str(line))
return '\n'.join(ret) 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 # vim: sw=4 et