mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-26 09:56:13 +01:00
- allow empty config values (e.g. "foo=")
This commit is contained in:
parent
6ca6a10955
commit
b195202be5
@ -105,12 +105,12 @@ class SectionLine(Line):
|
||||
return None
|
||||
|
||||
def _add_option(self, optname, value = None, line = None, sep = '='):
|
||||
if not (value or line):
|
||||
raise Error('Either value or line must be passed in')
|
||||
if value is None and line is None:
|
||||
raise ConfigParser.Error('Either value or line must be passed in')
|
||||
elif value and line:
|
||||
raise Error('value and line are mutually exclusive')
|
||||
raise ConfigParser.Error('value and line are mutually exclusive')
|
||||
|
||||
if value:
|
||||
if value is not None:
|
||||
line = '%s%s%s' % (optname, sep, value)
|
||||
opt = self._find(optname)
|
||||
if opt:
|
||||
|
Loading…
Reference in New Issue
Block a user