aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bb/codeparser.py
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2011-03-08 11:54:45 -0700
committerChris Larson <chris_larson@mentor.com>2011-03-16 07:38:30 -0700
commit8f5cf3a9975d8e6878e403be0e6edc22cc44f396 (patch)
tree4471dff31f71fbba5c96e3b421d5ccc22f119d67 /lib/bb/codeparser.py
parente0c364d9a5110b2b72361cfb5acc7daa21ac8420 (diff)
downloadbitbake-8f5cf3a9975d8e6878e403be0e6edc22cc44f396.tar.gz
codeparser: use ==, not 'is' to compare strings
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Diffstat (limited to 'lib/bb/codeparser.py')
-rw-r--r--lib/bb/codeparser.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/bb/codeparser.py b/lib/bb/codeparser.py
index c887a3ca0..84d1c09f2 100644
--- a/lib/bb/codeparser.py
+++ b/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