diff options
Diffstat (limited to 'bitbake/lib/bb/COW.py')
-rw-r--r-- | bitbake/lib/bb/COW.py | 23 |
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 @@ | |||
26 | from __future__ import print_function | 26 | from __future__ import print_function |
27 | import copy | 27 | import copy |
28 | import types | 28 | import types |
29 | types.ImmutableTypes = tuple([ \ | 29 | ImmutableTypes = ( |
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 | ||
40 | MUTABLE = "__mutable__" | 41 | MUTABLE = "__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 |