summaryrefslogtreecommitdiff
path: root/kconfiglib.py
diff options
context:
space:
mode:
Diffstat (limited to 'kconfiglib.py')
-rw-r--r--kconfiglib.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/kconfiglib.py b/kconfiglib.py
index 8379182..0afb7b6 100644
--- a/kconfiglib.py
+++ b/kconfiglib.py
@@ -3144,13 +3144,12 @@ class _FileFeed(object):
self.linenr -= 1
def next_nonblank(self):
- """Removes lines up to and including the next non-blank
- (not all-space) line and returns it."""
+ """Removes lines up to and including the next non-blank (not all-space)
+ line and returns it. Returns None if there are no more non-blank
+ lines."""
while 1:
line = self.get_next()
- if line is None:
- return None
- if not line.isspace():
+ if line is None or not line.isspace():
return line
def get_filename(self):