From e724b9f417d1baf898f5afc6376c73c1a2ad8db9 Mon Sep 17 00:00:00 2001 From: Christopher Larson Date: Fri, 4 Nov 2011 14:59:46 -0400 Subject: 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 --- lib/bb/data_smart.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lib/bb/data_smart.py') 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 "", "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 -- cgit 1.2.3-korg