summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlf Magnusson <ulfalizer@gmail.com>2018-11-24 02:48:22 +0100
committerUlf Magnusson <ulfalizer@gmail.com>2018-11-24 02:50:05 +0100
commit079d7352bec7294467e07071eb4dd4d1030b72a6 (patch)
treed1d776286dec2710eb0d7d021dfd898101caafb2
parent74ce9d348dd743af805484ccdd8a722a26aff42d (diff)
Simplify eval_string() a bit
-rw-r--r--kconfiglib.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/kconfiglib.py b/kconfiglib.py
index 901f33b..cfe69dc 100644
--- a/kconfiglib.py
+++ b/kconfiglib.py
@@ -1582,9 +1582,8 @@ class Kconfig(object):
# Don't include the "if " from below to avoid giving confusing error
# messages
self._line = s
- # [1:] removes the _T_IF token
- self._tokens = self._tokenize("if " + s)[1:]
- self._tokens_i = 0
+ self._tokens = self._tokenize("if " + s)
+ self._tokens_i = 1 # Skip the 'if' token
return expr_value(self._expect_expr_and_eol())