summaryrefslogtreecommitdiffstats
path: root/lib/bb/data_smart.py
diff options
context:
space:
mode:
authorChristopher Larson <chris_larson@mentor.com>2011-11-04 14:59:46 -0400
committerChristopher Larson <chris_larson@mentor.com>2011-11-04 15:25:25 -0400
commite724b9f417d1baf898f5afc6376c73c1a2ad8db9 (patch)
tree0f2950af2c3db3e20cd348e1121073626b5fd849 /lib/bb/data_smart.py
parent405dfe69e6a608826e599ebf2f83ef8cf5083b96 (diff)
downloadbitbake-contrib-e724b9f417d1baf898f5afc6376c73c1a2ad8db9.tar.gz
codeparser: silence non-literal warnings for vardeps
If the vardeps flag is not None, we now silence the warnings about non-literal usage for that variable. Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Diffstat (limited to 'lib/bb/data_smart.py')
-rw-r--r--lib/bb/data_smart.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/bb/data_smart.py b/lib/bb/data_smart.py
index 44369ed82..072f4033a 100644
--- a/lib/bb/data_smart.py
+++ b/lib/bb/data_smart.py
@@ -68,8 +68,14 @@ class VariableParse:
code = match.group()[3:-1]
codeobj = compile(code.strip(), self.varname or "<expansion>", "eval")
- parser = bb.codeparser.PythonParser(self.varname)
+ parser = bb.codeparser.PythonParser(self.varname, logger)
parser.parse_python(code)
+ if self.varname:
+ vardeps = self.d.getVarFlag(self.varname, "vardeps", True)
+ if vardeps is None:
+ parser.log.flush()
+ else:
+ parser.log.flush()
self.references |= parser.references
self.execs |= parser.execs