From 39f2f681e0356ae972e1ecae6a916d61094df88a Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Tue, 23 Jun 2015 08:02:09 +0200 Subject: Ignore '-style quotes in .config files. This is what the C implementation does, and it simplifies the code a bit. --- kconfiglib.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'kconfiglib.py') diff --git a/kconfiglib.py b/kconfiglib.py index ef2c4c8..df9b3a8 100644 --- a/kconfiglib.py +++ b/kconfiglib.py @@ -451,8 +451,8 @@ class Config(object): if set_match: name, val = set_match.groups() - if val.startswith(('"', "'")): - if len(val) < 2 or val[-1] != val[0]: + if val[0] == '"': + if len(val) < 2 or val[-1] != '"': _parse_error(line, "malformed string literal", line_feeder.filename, line_feeder.linenr) # Strip quotes and remove escapings. The unescaping -- cgit v1.2.3