1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-12-26 01:46:13 +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:
Danny Al-Gaaf 2013-05-27 15:14:15 +02:00
parent a5d14bfd48
commit a3cf8e8552

View File

@ -74,7 +74,7 @@ class ConfigLineOrder:
return section
def __delitem__(self, key):
line = self._find(line)
line = self._find_section(key)
if not line:
raise KeyError(key)
self._lines.remove(line)