]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
codeparser: use ==, not 'is' to compare strings
authorChris Larson <chris_larson@mentor.com>
Tue, 8 Mar 2011 18:54:45 +0000 (11:54 -0700)
committerChris Larson <chris_larson@mentor.com>
Wed, 16 Mar 2011 14:38:30 +0000 (07:38 -0700)
Signed-off-by: Chris Larson <chris_larson@mentor.com>
lib/bb/codeparser.py

index c887a3ca080a60d71eba3a81149196db3417ea28..84d1c09f21ad8a7fca505ede164d6e19c97d4fc9 100644 (file)
@@ -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