summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/data_smart.py
diff options
context:
space:
mode:
authorChristopher Larson <chris_larson@mentor.com>2011-10-28 21:32:26 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-11-10 11:44:29 +0000
commitae96ac11897c1017aea359a8e3325291bc198293 (patch)
tree60ea01a4a0b04ee64c5eda99f5f1759f115dd4a6 /bitbake/lib/bb/data_smart.py
parent48d7f5251bd5f3a44f713edfc297851258c57120 (diff)
downloadpoky-ae96ac11897c1017aea359a8e3325291bc198293.tar.gz
codeparser: accept a name for better messages
- If a name is passed to the parser, prepend the messages with "while parsing <name>:". This gives a bit more context. - Tweak the warning messages slightly (they had to be altered anyway to inject the variable being parsed). Before: DEBUG: Warning: in call to 'bb.data.getVar': argument ''%s' % var' is \ not a literal After: DEBUG: while parsing emit_pkgdata, in call of bb.data.getVar, argument \ ''%s' % var' is not a string literal (Bitbake rev: 1060193ae4d54e667735dbff5d1d2be49a3f95c9) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/data_smart.py')
-rw-r--r--bitbake/lib/bb/data_smart.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bitbake/lib/bb/data_smart.py b/bitbake/lib/bb/data_smart.py
index d8ba24ffd7..44369ed82d 100644
--- a/bitbake/lib/bb/data_smart.py
+++ b/bitbake/lib/bb/data_smart.py
@@ -68,7 +68,7 @@ class VariableParse:
68 code = match.group()[3:-1] 68 code = match.group()[3:-1]
69 codeobj = compile(code.strip(), self.varname or "<expansion>", "eval") 69 codeobj = compile(code.strip(), self.varname or "<expansion>", "eval")
70 70
71 parser = bb.codeparser.PythonParser() 71 parser = bb.codeparser.PythonParser(self.varname)
72 parser.parse_python(code) 72 parser.parse_python(code)
73 self.references |= parser.references 73 self.references |= parser.references
74 self.execs |= parser.execs 74 self.execs |= parser.execs