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>2012-01-30 16:16:12 +0000
commit2b26745c70a01bbabf5a303fe12a8b3b41071890 (patch)
tree8e1949e25863c5bf4088146c9d6674d7936344d3 /bitbake/lib/bb/data_smart.py
parent28ca6cc34b88eaddaa31b25c1d0dd2742c1638dd (diff)
downloadpoky-2b26745c70a01bbabf5a303fe12a8b3b41071890.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