summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2011-03-08 11:54:45 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-03-31 12:23:19 +0100
commit626b96e255b6461e2bce209ecfc1ff110f65d54e (patch)
tree2e697ecdb311e26cee5550f3611beaa0faeb5f2b /bitbake/lib
parentaf0163c2b671eecc0807d75d3556484b0ee187d8 (diff)
downloadast2050-yocto-poky-626b96e255b6461e2bce209ecfc1ff110f65d54e.zip
ast2050-yocto-poky-626b96e255b6461e2bce209ecfc1ff110f65d54e.tar.gz
codeparser: use ==, not 'is' to compare strings
(Bitbake rev: 8f5cf3a9975d8e6878e403be0e6edc22cc44f396) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/codeparser.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bitbake/lib/bb/codeparser.py b/bitbake/lib/bb/codeparser.py
index c887a3c..84d1c09 100644
--- a/bitbake/lib/bb/codeparser.py
+++ b/bitbake/lib/bb/codeparser.py
@@ -21,13 +21,13 @@ def check_indent(codestr):
"""If the code is indented, add a top level piece of code to 'remove' the indentation"""
i = 0
- while codestr[i] in ["\n", " ", " "]:
+ while codestr[i] in ["\n", "\t", " "]:
i = i + 1
if i == 0:
return codestr
- if codestr[i-1] is " " or codestr[i-1] is " ":
+ if codestr[i-1] == "\t" or codestr[i-1] == " ":
return "if 1:\n" + codestr
return codestr
OpenPOWER on IntegriCloud