summaryrefslogtreecommitdiffstats
path: root/scripts/lib/recipetool/create_buildsys_python.py
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2016-05-18 21:52:33 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-06-02 08:24:01 +0100
commited7abe6b9a2ff81d320e7c63841487d37e61b5a5 (patch)
tree783819e427cc29027d91ccd7ff0d6e7ba25b43ca /scripts/lib/recipetool/create_buildsys_python.py
parent7eab022d4b484aec40998f95835ba46c5da168cf (diff)
downloadpoky-ed7abe6b9a2ff81d320e7c63841487d37e61b5a5.tar.gz
scripts: Replace basestring -> str for python3
Python 3 doesn't have basestring type as all string are unicode strings. (From OE-Core rev: e8cfab060f4ff3c4c16387871354d407910e87aa) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/recipetool/create_buildsys_python.py')
-rw-r--r--scripts/lib/recipetool/create_buildsys_python.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/lib/recipetool/create_buildsys_python.py b/scripts/lib/recipetool/create_buildsys_python.py
index cc3b5a45fd..5cbea2abba 100644
--- a/scripts/lib/recipetool/create_buildsys_python.py
+++ b/scripts/lib/recipetool/create_buildsys_python.py
@@ -245,7 +245,7 @@ class PythonRecipeHandler(RecipeHandler):
245 if field not in self.bbvar_map: 245 if field not in self.bbvar_map:
246 continue 246 continue
247 247
248 if isinstance(values, basestring): 248 if isinstance(values, str):
249 value = values 249 value = values
250 else: 250 else:
251 value = ' '.join(str(v) for v in values if v) 251 value = ' '.join(str(v) for v in values if v)
@@ -436,7 +436,7 @@ class PythonRecipeHandler(RecipeHandler):
436 return value 436 return value
437 437
438 value = info[variable] 438 value = info[variable]
439 if isinstance(value, basestring): 439 if isinstance(value, str):
440 new_value = replace_value(search, replace, value) 440 new_value = replace_value(search, replace, value)
441 if new_value is None: 441 if new_value is None:
442 del info[variable] 442 del info[variable]
@@ -706,7 +706,7 @@ class LiteralAstTransform(ast.NodeTransformer):
706def has_non_literals(value): 706def has_non_literals(value):
707 if isinstance(value, ast.AST): 707 if isinstance(value, ast.AST):
708 return True 708 return True
709 elif isinstance(value, basestring): 709 elif isinstance(value, str):
710 return False 710 return False
711 elif hasattr(value, 'values'): 711 elif hasattr(value, 'values'):
712 return any(has_non_literals(v) for v in value.values()) 712 return any(has_non_literals(v) for v in value.values())