diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-12-07 13:10:51 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-12-07 17:25:43 +0000 |
commit | 1a4ea02932d07c437187f67ac5b6e25ad76ee84a (patch) | |
tree | 6dd794b68a0c452fff8b2339549b06295f615d73 | |
parent | 65b795d900be19ac5e67c81eafc03a8bdedd3ece (diff) | |
download | bitbake-1a4ea02932d07c437187f67ac5b6e25ad76ee84a.tar.gz |
BBHandler: Ensure parser state engine is correctly reset for new parsing
The classes variable in particular could be in an odd state if parsing of a
previous recipe had abruptly ended.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | lib/bb/parse/parse_py/BBHandler.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/bb/parse/parse_py/BBHandler.py b/lib/bb/parse/parse_py/BBHandler.py index 2e0647b5d..c4e579d07 100644 --- a/lib/bb/parse/parse_py/BBHandler.py +++ b/lib/bb/parse/parse_py/BBHandler.py @@ -107,14 +107,15 @@ def get_statements(filename, absolute_filename, base_name): return statements def handle(fn, d, include): - global __func_start_regexp__, __inherit_regexp__, __export_func_regexp__, __addtask_regexp__, __addhandler_regexp__, __infunc__, __body__, __residue__ + global __func_start_regexp__, __inherit_regexp__, __export_func_regexp__, __addtask_regexp__, __addhandler_regexp__, __infunc__, __body__, __residue__, __inpython__, classes __body__ = [] __infunc__ = "" __classname__ = "" __residue__ = [] - + __inpython__ = False if include == 0: + classes = [ None, ] logger.debug(2, "BB %s: handle(data)", fn) else: logger.debug(2, "BB %s: handle(data, include)", fn) |