summaryrefslogtreecommitdiffstats
path: root/lib/bb/parse/ast.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-07-18 11:35:11 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-07-19 09:52:32 +0100
commitc51cfaf48d3b12a19b01e824b6ba4230376bcad4 (patch)
tree8861ebc1182642f4f9be5118df13740855be90a4 /lib/bb/parse/ast.py
parentb2017f493ab730d804ae44ec5a168d464626d046 (diff)
downloadbitbake-contrib-c51cfaf48d3b12a19b01e824b6ba4230376bcad4.tar.gz
bitbake: Warn upon finding tab indentation in python functions
Mixed spacing in python functions can cause subtle issues and generally confuses users. We've standardised on 4 space indentation, adding this warning helps ensure consistency and avoid bugs. It also makes _prepend and _append operations on python functions slightly less risky. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/parse/ast.py')
-rw-r--r--lib/bb/parse/ast.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/bb/parse/ast.py b/lib/bb/parse/ast.py
index eae840fa8..86f94636b 100644
--- a/lib/bb/parse/ast.py
+++ b/lib/bb/parse/ast.py
@@ -212,9 +212,9 @@ class ExportFuncsNode(AstNode):
data.setVarFlag(calledvar, flag, data.getVarFlag(var, flag))
if data.getVarFlag(calledvar, "python"):
- data.setVar(var, "\tbb.build.exec_func('" + calledvar + "', d)\n")
+ data.setVar(var, " bb.build.exec_func('" + calledvar + "', d)\n")
else:
- data.setVar(var, "\t" + calledvar + "\n")
+ data.setVar(var, " " + calledvar + "\n")
data.setVarFlag(var, 'export_func', '1')
class AddTaskNode(AstNode):