summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kconfiglib.py11
1 files changed, 3 insertions, 8 deletions
diff --git a/kconfiglib.py b/kconfiglib.py
index 9b1bbca..1b4ac3d 100644
--- a/kconfiglib.py
+++ b/kconfiglib.py
@@ -3731,18 +3731,13 @@ def _get_lines(filename):
with open(filename, "r") as f:
lines = []
accum = ""
- while 1:
- line = f.readline()
-
- if line == "":
- return lines
-
+ for line in f:
if line.endswith("\\\n"):
accum += line[:-2]
else:
- accum += line
- lines.append(accum)
+ lines.append(accum + line)
accum = ""
+ return lines
def _strip_trailing_slash(path):
"""Removes any trailing slash from 'path'."""