diff options
Diffstat (limited to 'bitbake/lib/bb')
| -rw-r--r-- | bitbake/lib/bb/codeparser.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/bitbake/lib/bb/codeparser.py b/bitbake/lib/bb/codeparser.py index bb890dddd0..6ce0c5182f 100644 --- a/bitbake/lib/bb/codeparser.py +++ b/bitbake/lib/bb/codeparser.py | |||
| @@ -227,17 +227,17 @@ class PythonParser(): | |||
| 227 | if name and (name.endswith(self.getvars) or name.endswith(self.getvarflags) or name in self.containsfuncs or name in self.containsanyfuncs): | 227 | if name and (name.endswith(self.getvars) or name.endswith(self.getvarflags) or name in self.containsfuncs or name in self.containsanyfuncs): |
| 228 | if isinstance(node.args[0], ast.Constant) and isinstance(node.args[0].value, str): | 228 | if isinstance(node.args[0], ast.Constant) and isinstance(node.args[0].value, str): |
| 229 | varname = node.args[0].value | 229 | varname = node.args[0].value |
| 230 | if name in self.containsfuncs and isinstance(node.args[1], ast.Str): | 230 | if name in self.containsfuncs and isinstance(node.args[1], ast.Constant): |
| 231 | if varname not in self.contains: | 231 | if varname not in self.contains: |
| 232 | self.contains[varname] = set() | 232 | self.contains[varname] = set() |
| 233 | self.contains[varname].add(node.args[1].s) | 233 | self.contains[varname].add(node.args[1].value) |
| 234 | elif name in self.containsanyfuncs and isinstance(node.args[1], ast.Str): | 234 | elif name in self.containsanyfuncs and isinstance(node.args[1], ast.Constant): |
| 235 | if varname not in self.contains: | 235 | if varname not in self.contains: |
| 236 | self.contains[varname] = set() | 236 | self.contains[varname] = set() |
| 237 | self.contains[varname].update(node.args[1].s.split()) | 237 | self.contains[varname].update(node.args[1].value.split()) |
| 238 | elif name.endswith(self.getvarflags): | 238 | elif name.endswith(self.getvarflags): |
| 239 | if isinstance(node.args[1], ast.Str): | 239 | if isinstance(node.args[1], ast.Constant): |
| 240 | self.references.add('%s[%s]' % (varname, node.args[1].s)) | 240 | self.references.add('%s[%s]' % (varname, node.args[1].value)) |
| 241 | else: | 241 | else: |
| 242 | self.warn(node.func, node.args[1]) | 242 | self.warn(node.func, node.args[1]) |
| 243 | else: | 243 | else: |
| @@ -245,8 +245,8 @@ class PythonParser(): | |||
| 245 | else: | 245 | else: |
| 246 | self.warn(node.func, node.args[0]) | 246 | self.warn(node.func, node.args[0]) |
| 247 | elif name and name.endswith(".expand"): | 247 | elif name and name.endswith(".expand"): |
| 248 | if isinstance(node.args[0], ast.Str): | 248 | if isinstance(node.args[0], ast.Constant): |
| 249 | value = node.args[0].s | 249 | value = node.args[0].value |
| 250 | d = bb.data.init() | 250 | d = bb.data.init() |
| 251 | parser = d.expandWithRefs(value, self.name) | 251 | parser = d.expandWithRefs(value, self.name) |
| 252 | self.references |= parser.references | 252 | self.references |= parser.references |
| @@ -256,8 +256,8 @@ class PythonParser(): | |||
| 256 | self.contains[varname] = set() | 256 | self.contains[varname] = set() |
| 257 | self.contains[varname] |= parser.contains[varname] | 257 | self.contains[varname] |= parser.contains[varname] |
| 258 | elif name in self.execfuncs: | 258 | elif name in self.execfuncs: |
| 259 | if isinstance(node.args[0], ast.Str): | 259 | if isinstance(node.args[0], ast.Constant): |
| 260 | self.var_execs.add(node.args[0].s) | 260 | self.var_execs.add(node.args[0].value) |
| 261 | else: | 261 | else: |
| 262 | self.warn(node.func, node.args[0]) | 262 | self.warn(node.func, node.args[0]) |
| 263 | elif name and isinstance(node.func, (ast.Name, ast.Attribute)): | 263 | elif name and isinstance(node.func, (ast.Name, ast.Attribute)): |
