From 22a21799059b156d8858cbf32acb7c2aefb9a23b Mon Sep 17 00:00:00 2001 From: Chris Larson Date: Mon, 12 Apr 2010 08:14:11 -0700 Subject: Kill unnecessary usages of the types module types.IntType -> int types.StringType -> basestring ... Also moves our ImmutableTypes tuple into our own namespace. (Bitbake rev: 83674a3a5564ecb1f9d2c9b2d5b1eeb3c31272ab) Signed-off-by: Chris Larson Signed-off-by: Richard Purdie --- bitbake/lib/bb/data_smart.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'bitbake/lib/bb/data_smart.py') diff --git a/bitbake/lib/bb/data_smart.py b/bitbake/lib/bb/data_smart.py index 1704ed631c..9436023b30 100644 --- a/bitbake/lib/bb/data_smart.py +++ b/bitbake/lib/bb/data_smart.py @@ -28,7 +28,7 @@ BitBake build tools. # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # Based on functions from the base bb module, Copyright 2003 Holger Schurig -import copy, re, sys, types +import copy, re, sys import bb from bb import utils from bb.COW import COWDictBase @@ -66,10 +66,10 @@ class DataSmart: code = match.group()[3:-1] codeobj = compile(code.strip(), varname or "", "eval") s = utils.better_eval(codeobj, {"d": self}) - if isinstance(s, types.IntType): s = str(s) + if isinstance(s, int): s = str(s) return s - if not isinstance(s, types.StringType): # sanity check + if not isinstance(s, basestring): # sanity check return s if varname and varname in self.expand_cache: @@ -81,7 +81,7 @@ class DataSmart: s = __expand_var_regexp__.sub(var_sub, s) s = __expand_python_regexp__.sub(python_sub, s) if s == olds: break - if not isinstance(s, types.StringType): # sanity check + if not isinstance(s, basestring): # sanity check bb.msg.error(bb.msg.domain.Data, 'expansion of %s returned non-string %s' % (olds, s)) except KeyboardInterrupt: raise -- cgit v1.2.3-54-g00ecf