summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/data_smart.py
diff options
context:
space:
mode:
authorChristopher Larson <chris_larson@mentor.com>2016-04-30 12:43:54 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-05-06 10:18:12 +0100
commit39b79efc7e39f677287447a608892790b57e3e00 (patch)
treeae39d4987f93690bba04c30a1401b864ae6c48b3 /bitbake/lib/bb/data_smart.py
parentcd20dd057b74fac39a0b635e479ccfdcb62452fc (diff)
downloadpoky-39b79efc7e39f677287447a608892790b57e3e00.tar.gz
bitbake: bb.data_smart: use iter() for __len__
It seems the frozenset constructor in pypy runs len(), so we can't pass the DataSmart instance directly to it, instead pass the iterator. Fixes pypy support. (Bitbake rev: b492836e08745e04bd9ba2fb0b56a680a5fdce79) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/data_smart.py')
-rw-r--r--bitbake/lib/bb/data_smart.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bitbake/lib/bb/data_smart.py b/bitbake/lib/bb/data_smart.py
index fa1e794279..2ab884bb39 100644
--- a/bitbake/lib/bb/data_smart.py
+++ b/bitbake/lib/bb/data_smart.py
@@ -917,7 +917,7 @@ class DataSmart(MutableMapping):
917 yield k 917 yield k
918 918
919 def __len__(self): 919 def __len__(self):
920 return len(frozenset(self)) 920 return len(frozenset(iter(self)))
921 921
922 def __getitem__(self, item): 922 def __getitem__(self, item):
923 value = self.getVar(item, False) 923 value = self.getVar(item, False)