aboutsummaryrefslogtreecommitdiffstats
path: root/lib/codegen.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2016-05-12 08:30:35 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-06-01 15:27:55 +0100
commitd0f904d407f57998419bd9c305ce53e5eaa36b24 (patch)
tree47488e99b76374cddf1566cb8af3f3c32bd13b76 /lib/codegen.py
parentbf25f05ce4db11466e62f134f9a6916f886a93d9 (diff)
downloadbitbake-d0f904d407f57998419bd9c305ce53e5eaa36b24.tar.gz
bitbake: Convert to python 3
Various misc changes to convert bitbake to python3 which don't warrant separation into separate commits. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/codegen.py')
-rw-r--r--lib/codegen.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/codegen.py b/lib/codegen.py
index be772d510..62a6748c4 100644
--- a/lib/codegen.py
+++ b/lib/codegen.py
@@ -214,11 +214,11 @@ class SourceGenerator(NodeVisitor):
paren_or_comma()
self.write(keyword.arg + '=')
self.visit(keyword.value)
- if node.starargs is not None:
+ if hasattr(node, 'starargs') and node.starargs is not None:
paren_or_comma()
self.write('*')
self.visit(node.starargs)
- if node.kwargs is not None:
+ if hasattr(node, 'kwargs') and node.kwargs is not None:
paren_or_comma()
self.write('**')
self.visit(node.kwargs)
@@ -379,11 +379,11 @@ class SourceGenerator(NodeVisitor):
write_comma()
self.write(keyword.arg + '=')
self.visit(keyword.value)
- if node.starargs is not None:
+ if hasattr(node, 'starargs') and node.starargs is not None:
write_comma()
self.write('*')
self.visit(node.starargs)
- if node.kwargs is not None:
+ if hasattr(node, 'kwargs') and node.kwargs is not None:
write_comma()
self.write('**')
self.visit(node.kwargs)