diff options
author | Christopher Larson <chris_larson@mentor.com> | 2011-10-28 21:32:26 -0400 |
---|---|---|
committer | Christopher Larson <chris_larson@mentor.com> | 2011-11-04 14:57:56 -0400 |
commit | 1060193ae4d54e667735dbff5d1d2be49a3f95c9 (patch) | |
tree | d5c80f45afc37e808e62e9c1a2d9ca33d8d86b45 /lib/bb/data_smart.py | |
parent | 84e535b5165c7e936c5b1486bdf4626ed3649f5f (diff) | |
download | bitbake-1060193ae4d54e667735dbff5d1d2be49a3f95c9.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
Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Diffstat (limited to 'lib/bb/data_smart.py')
-rw-r--r-- | lib/bb/data_smart.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bb/data_smart.py b/lib/bb/data_smart.py index d8ba24ffd..44369ed82 100644 --- a/lib/bb/data_smart.py +++ b/lib/bb/data_smart.py @@ -68,7 +68,7 @@ class VariableParse: code = match.group()[3:-1] codeobj = compile(code.strip(), self.varname or "<expansion>", "eval") - parser = bb.codeparser.PythonParser() + parser = bb.codeparser.PythonParser(self.varname) parser.parse_python(code) self.references |= parser.references self.execs |= parser.execs |