1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-02-04 02:26:16 +01:00

- this is escaping isn't needed. If we don't want to use interpolation we should call the appropriate methods with correct parameters. (luckily nobody except Peter noticed this issue because it resulted in a 0byte ~/.oscrc)

This commit is contained in:
Marcus Hüwe 2008-11-28 16:53:07 +00:00
parent 61740adee9
commit 9d15f612cb

View File

@ -168,8 +168,6 @@ class OptionLine(Line):
def format(self, line):
mo = ConfigParser.ConfigParser.OPTCRE.match(line.strip())
key, val = mo.group('option', 'value')
# escape all occurrences of '%' otherwise string formatting will fail
line = line.replace('%', '%%')
self.frmt = line.replace(key.strip(), '%s', 1)
pos = val.find(' ;')
if pos >= 0: