mirror of
https://github.com/openSUSE/osc.git
synced 2025-02-11 21:29:25 +01:00
Merge pull request #1601 from Vogtinator/no__name__
OscConfigParser: Remove automatic __name__ option
This commit is contained in:
commit
d468bd692f
@ -270,10 +270,7 @@ class OscConfigParser(configparser.ConfigParser):
|
||||
elif sectname == configparser.DEFAULTSECT:
|
||||
cursect = self._defaults
|
||||
else:
|
||||
#cursect = {'__name__': sectname}
|
||||
#self._sections[sectname] = cursect
|
||||
self.add_section(sectname)
|
||||
self.set(sectname, '__name__', sectname)
|
||||
# So sections can't start with a continuation line
|
||||
cursect = sectname
|
||||
optname = None
|
||||
@ -348,8 +345,6 @@ class OscConfigParser(configparser.ConfigParser):
|
||||
ret.append('')
|
||||
ret.append(f'[{line.name}]')
|
||||
for sline in line._lines:
|
||||
if sline.name == '__name__':
|
||||
continue
|
||||
if sline.type == 'option':
|
||||
# special handling for continuation lines
|
||||
val = '\n '.join(sline.value.split('\n'))
|
||||
|
Loading…
x
Reference in New Issue
Block a user