diff options
| author | Ulf Magnusson <ulfalizer@gmail.com> | 2012-12-13 14:47:49 +0100 |
|---|---|---|
| committer | Ulf Magnusson <ulfalizer@gmail.com> | 2012-12-13 14:47:49 +0100 |
| commit | bcbc4175e2949df6cc05bf8f729207eb5401cbb0 (patch) | |
| tree | a472020c5ab21e8135373368b23ac8444055e287 | |
| parent | d80409002cf3c3fc64d86268decf802ce542db5f (diff) | |
Make _comment() correctly comment an empty line.
| -rw-r--r-- | kconfiglib.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kconfiglib.py b/kconfiglib.py index 6c59a38..f068a2c 100644 --- a/kconfiglib.py +++ b/kconfiglib.py @@ -3645,6 +3645,8 @@ def _sep_lines(*args): def _comment(s): """Returns a new string with "# " inserted before each line in 's'.""" + if not s: + return "#" return "\n".join(["#" + line for line in s.splitlines()]) def _get_lines(filename): |
