From 71d9bb31f91fbd8f4e38e47fce54fd3221b3f8f5 Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Sat, 6 Jun 2015 04:24:26 +0200 Subject: Add some test cases for malformed expressions. Also fix a tokenizer nit: a '!' at the end of a line can be tokenized (though it's meaningless). --- kconfiglib.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'kconfiglib.py') diff --git a/kconfiglib.py b/kconfiglib.py index 81659ca..fc5d14f 100644 --- a/kconfiglib.py +++ b/kconfiglib.py @@ -751,9 +751,7 @@ class Config(object): i += 1 elif c == "!": - if i >= len(s): - _tokenization_error(s, filename, linenr) - if s[i] == "=": + if i < len(s) and s[i] == "=": append(T_UNEQUAL) i += 1 else: -- cgit v1.2.3