summaryrefslogtreecommitdiff
path: root/kconfiglib.py
diff options
context:
space:
mode:
authorUlf Magnusson <ulfalizer@gmail.com>2018-12-15 12:32:45 +0100
committerUlf Magnusson <ulfalizer@gmail.com>2018-12-15 12:33:25 +0100
commite34eb67a736c765cd1f858de80ff50157eda18bc (patch)
tree636e02f4490f06719e754dd9fae8b30f25119542 /kconfiglib.py
parent6c163641759b40f6af8b80e4f0e55511f0a278d7 (diff)
Check isspace() before EOF in _parse_help()
More common. isspace() returns False for empty strings.
Diffstat (limited to 'kconfiglib.py')
-rw-r--r--kconfiglib.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/kconfiglib.py b/kconfiglib.py
index 7ad76fd..b9264e4 100644
--- a/kconfiglib.py
+++ b/kconfiglib.py
@@ -2977,12 +2977,12 @@ class Kconfig(object):
while 1:
line = readline()
- if not line:
- break
-
if line.isspace():
# No need to preserve the exact whitespace in these
add_line("\n")
+ elif not line:
+ # End of file
+ break
else:
expline = line.expandtabs()
if len_(expline) - len_(expline.lstrip()) < indent: