summaryrefslogtreecommitdiff
path: root/kconfiglib.py
diff options
context:
space:
mode:
Diffstat (limited to 'kconfiglib.py')
-rw-r--r--kconfiglib.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/kconfiglib.py b/kconfiglib.py
index fbeaad5..4679126 100644
--- a/kconfiglib.py
+++ b/kconfiglib.py
@@ -614,7 +614,11 @@ class Config(object):
for_eval -- True when parsing an expression for a call to
Config.eval(), in which case we should not treat the first
token specially nor register new symbols."""
- s = s.lstrip()
+
+ # lstrip() would work here too, but removing the '\n' at the end leads
+ # to earlier termination in the 'while' loop below, saving lots of
+ # calls
+ s = s.strip()
if s == "" or s[0] == "#":
return _Feed([])