From bcbc4175e2949df6cc05bf8f729207eb5401cbb0 Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Thu, 13 Dec 2012 14:47:49 +0100 Subject: Make _comment() correctly comment an empty line. --- kconfiglib.py | 2 ++ 1 file changed, 2 insertions(+) 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): -- cgit v1.2.3