aboutsummaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/COW.py
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2010-04-12 08:14:11 -0700
committerRichard Purdie <rpurdie@linux.intel.com>2010-07-02 15:41:33 +0100
commit22a21799059b156d8858cbf32acb7c2aefb9a23b (patch)
tree1e0e83c86fe04e30576ddfb34577940596f8d809 /bitbake/lib/bb/COW.py
parent1180bab54e2879401f3586c91a48174191a1ee8b (diff)
downloadopenembedded-core-contrib-22a21799059b156d8858cbf32acb7c2aefb9a23b.tar.gz
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 <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake/lib/bb/COW.py')
-rw-r--r--bitbake/lib/bb/COW.py23
1 files changed, 12 insertions, 11 deletions
diff --git a/bitbake/lib/bb/COW.py b/bitbake/lib/bb/COW.py
index ccb7cde3ba..23a2cae2b4 100644
--- a/bitbake/lib/bb/COW.py
+++ b/bitbake/lib/bb/COW.py
@@ -26,16 +26,17 @@
from __future__ import print_function
import copy
import types
-types.ImmutableTypes = tuple([ \
- types.BooleanType, \
- types.ComplexType, \
- types.FloatType, \
- types.IntType, \
- types.LongType, \
- types.NoneType, \
- types.TupleType, \
- frozenset] + \
- list(types.StringTypes))
+ImmutableTypes = (
+ types.NoneType,
+ bool,
+ complex,
+ float,
+ int,
+ long,
+ tuple,
+ frozenset,
+ basestring
+)
MUTABLE = "__mutable__"
@@ -60,7 +61,7 @@ class COWDictMeta(COWMeta):
__call__ = cow
def __setitem__(cls, key, value):
- if not isinstance(value, types.ImmutableTypes):
+ if not isinstance(value, ImmutableTypes):
if not isinstance(value, COWMeta):
cls.__hasmutable__ = True
key += MUTABLE