summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/COW.py
diff options
context:
space:
mode:
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 @@
26from __future__ import print_function 26from __future__ import print_function
27import copy 27import copy
28import types 28import types
29types.ImmutableTypes = tuple([ \ 29ImmutableTypes = (
30 types.BooleanType, \ 30 types.NoneType,
31 types.ComplexType, \ 31 bool,
32 types.FloatType, \ 32 complex,
33 types.IntType, \ 33 float,
34 types.LongType, \ 34 int,
35 types.NoneType, \ 35 long,
36 types.TupleType, \ 36 tuple,
37 frozenset] + \ 37 frozenset,
38 list(types.StringTypes)) 38 basestring
39)
39 40
40MUTABLE = "__mutable__" 41MUTABLE = "__mutable__"
41 42
@@ -60,7 +61,7 @@ class COWDictMeta(COWMeta):
60 __call__ = cow 61 __call__ = cow
61 62
62 def __setitem__(cls, key, value): 63 def __setitem__(cls, key, value):
63 if not isinstance(value, types.ImmutableTypes): 64 if not isinstance(value, ImmutableTypes):
64 if not isinstance(value, COWMeta): 65 if not isinstance(value, COWMeta):
65 cls.__hasmutable__ = True 66 cls.__hasmutable__ = True
66 key += MUTABLE 67 key += MUTABLE