mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-13 17:16:23 +01:00
OscConfigParser.py: fix __delitem__
Two issues: - There is no _find() member in ConfigLineOrder. Use _find_section() instead - Use 'key' instead of 'line' as argument for _find_section() since 'line' is used before assignment. Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
This commit is contained in:
parent
a5d14bfd48
commit
a3cf8e8552
@ -74,7 +74,7 @@ class ConfigLineOrder:
|
|||||||
return section
|
return section
|
||||||
|
|
||||||
def __delitem__(self, key):
|
def __delitem__(self, key):
|
||||||
line = self._find(line)
|
line = self._find_section(key)
|
||||||
if not line:
|
if not line:
|
||||||
raise KeyError(key)
|
raise KeyError(key)
|
||||||
self._lines.remove(line)
|
self._lines.remove(line)
|
||||||
|
Loading…
Reference in New Issue
Block a user