diff options
-rw-r--r-- | bitbake/lib/bb/parse/parse_py/BBHandler.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/bitbake/lib/bb/parse/parse_py/BBHandler.py b/bitbake/lib/bb/parse/parse_py/BBHandler.py index 31d1e21c67..402cd07e2a 100644 --- a/bitbake/lib/bb/parse/parse_py/BBHandler.py +++ b/bitbake/lib/bb/parse/parse_py/BBHandler.py | |||
@@ -193,9 +193,14 @@ def feeder(lineno, s, fn, root, statements): | |||
193 | if lineno == IN_PYTHON_EOF: | 193 | if lineno == IN_PYTHON_EOF: |
194 | return | 194 | return |
195 | 195 | ||
196 | # fall through | ||
197 | 196 | ||
198 | if s == '' or s[0] == '#': return # skip comments and empty lines | 197 | # Skip empty lines |
198 | if s == '': | ||
199 | return | ||
200 | |||
201 | if s[0] == '#': | ||
202 | if len(__residue__) != 0 and __residue__[0][0] != "#": | ||
203 | bb.error("There is a comment on line %s of file %s (%s) which is in the middle of a multiline expression.\nBitbake used to ignore these but no longer does so, please fix your metadata as errors are likely as a result of this change." % (lineno, fn, s)) | ||
199 | 204 | ||
200 | if s[-1] == '\\': | 205 | if s[-1] == '\\': |
201 | __residue__.append(s[:-1]) | 206 | __residue__.append(s[:-1]) |
@@ -204,6 +209,10 @@ def feeder(lineno, s, fn, root, statements): | |||
204 | s = "".join(__residue__) + s | 209 | s = "".join(__residue__) + s |
205 | __residue__ = [] | 210 | __residue__ = [] |
206 | 211 | ||
212 | # Skip comments | ||
213 | if s[0] == '#': | ||
214 | return | ||
215 | |||
207 | m = __func_start_regexp__.match(s) | 216 | m = __func_start_regexp__.match(s) |
208 | if m: | 217 | if m: |
209 | __infunc__ = m.group("func") or "__anonymous" | 218 | __infunc__ = m.group("func") or "__anonymous" |