From 626b96e255b6461e2bce209ecfc1ff110f65d54e Mon Sep 17 00:00:00 2001 From: Chris Larson Date: Tue, 8 Mar 2011 11:54:45 -0700 Subject: codeparser: use ==, not 'is' to compare strings (Bitbake rev: 8f5cf3a9975d8e6878e403be0e6edc22cc44f396) Signed-off-by: Chris Larson Signed-off-by: Richard Purdie --- bitbake/lib/bb/codeparser.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bitbake') diff --git a/bitbake/lib/bb/codeparser.py b/bitbake/lib/bb/codeparser.py index c887a3ca08..84d1c09f21 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 -- cgit v1.2.3-54-g00ecf