diff options
-rw-r--r-- | bitbake/lib/codegen.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/bitbake/lib/codegen.py b/bitbake/lib/codegen.py index 62a6748c47..6955a7ada5 100644 --- a/bitbake/lib/codegen.py +++ b/bitbake/lib/codegen.py | |||
@@ -401,6 +401,12 @@ class SourceGenerator(NodeVisitor): | |||
401 | def visit_Num(self, node): | 401 | def visit_Num(self, node): |
402 | self.write(repr(node.n)) | 402 | self.write(repr(node.n)) |
403 | 403 | ||
404 | def visit_Constant(self, node): | ||
405 | # Python 3.8 deprecated visit_Num(), visit_Str(), visit_Bytes(), | ||
406 | # visit_NameConstant() and visit_Ellipsis(). They can be removed once we | ||
407 | # require 3.8+. | ||
408 | self.write(repr(node.value)) | ||
409 | |||
404 | def visit_Tuple(self, node): | 410 | def visit_Tuple(self, node): |
405 | self.write('(') | 411 | self.write('(') |
406 | idx = -1 | 412 | idx = -1 |