From a5358511b1741e6abff1a8f5136f1c8662645fea Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Mon, 21 Jan 2013 11:00:52 +0000 Subject: bitbake: BBHandler/ConfHandler: Merge fix for multiline comments This was meant to be squashed into the previous commit for multiline comment handling. It fixes the case the commented multiline is followed by an empty line which was resulting in a traceback instead of a sane error message. (Bitbake rev: 7e7d692e244fe8dca533f842ca143b9c821e317c) Signed-off-by: Richard Purdie --- bitbake/lib/bb/parse/parse_py/ConfHandler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bitbake/lib/bb/parse/parse_py/ConfHandler.py') diff --git a/bitbake/lib/bb/parse/parse_py/ConfHandler.py b/bitbake/lib/bb/parse/parse_py/ConfHandler.py index 9b09c9f56a..8f3f120ed5 100644 --- a/bitbake/lib/bb/parse/parse_py/ConfHandler.py +++ b/bitbake/lib/bb/parse/parse_py/ConfHandler.py @@ -108,7 +108,7 @@ def handle(fn, data, include): while s[-1] == '\\': s2 = f.readline().strip() lineno = lineno + 1 - if s2 and s[0] == "#" and s2[0] != "#": + if (not s2 or s2 and s2[0] != "#") and s[0] == "#" : bb.fatal("There is a confusing multiline, partially commented expression on line %s of file %s (%s).\nPlease clarify whether this is all a comment or should be parsed." % (lineno, fn, s)) s = s[:-1] + s2 # skip comments -- cgit v1.2.3-54-g00ecf