diff options
| author | Ulf Magnusson <ulfalizer@gmail.com> | 2018-12-15 12:32:45 +0100 |
|---|---|---|
| committer | Ulf Magnusson <ulfalizer@gmail.com> | 2018-12-15 12:33:25 +0100 |
| commit | e34eb67a736c765cd1f858de80ff50157eda18bc (patch) | |
| tree | 636e02f4490f06719e754dd9fae8b30f25119542 | |
| parent | 6c163641759b40f6af8b80e4f0e55511f0a278d7 (diff) | |
Check isspace() before EOF in _parse_help()
More common. isspace() returns False for empty strings.
| -rw-r--r-- | kconfiglib.py | 6 |
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: |
