summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb
diff options
context:
space:
mode:
authorKai Kang <kai.kang@windriver.com>2016-10-09 16:34:32 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-11-23 10:59:56 +0000
commitcd381cd71466158b34160fc0519db9f1c5870af4 (patch)
tree0733c32e498e23517a208be36763fa43ee70bbf8 /bitbake/lib/bb
parentdbf3a9fa8ee9bfb2887fb0e4808bd77eda5164e1 (diff)
downloadpoky-cd381cd71466158b34160fc0519db9f1c5870af4.tar.gz
bitbake: COW.py: fix sample codes
The call of methods iteritems() and itervalues() in sample codes were replaced by items() and values() to convert to Python 3 by Bitbake rev d0f904d407f57998419bd9c305ce53e5eaa36b24. But the methods iteritems() and itervalues() belong to class COWDictMeta not class dict or set. The modifications should not be made in purpose that it fails to run sample codes, so revert them. (Bitbake rev: d140f0ee6f301264e226914766d9f63558acfd6c) Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb')
-rw-r--r--bitbake/lib/bb/COW.py24
1 files changed, 12 insertions, 12 deletions
diff --git a/bitbake/lib/bb/COW.py b/bitbake/lib/bb/COW.py
index 77a05cfe35..36ebbd9d19 100644
--- a/bitbake/lib/bb/COW.py
+++ b/bitbake/lib/bb/COW.py
@@ -213,11 +213,11 @@ if __name__ == "__main__":
213 print() 213 print()
214 214
215 print("a", a) 215 print("a", a)
216 for x in a.items(): 216 for x in a.iteritems():
217 print(x) 217 print(x)
218 print("--") 218 print("--")
219 print("b", b) 219 print("b", b)
220 for x in b.items(): 220 for x in b.iteritems():
221 print(x) 221 print(x)
222 print() 222 print()
223 223
@@ -225,11 +225,11 @@ if __name__ == "__main__":
225 b['a'] = 'c' 225 b['a'] = 'c'
226 226
227 print("a", a) 227 print("a", a)
228 for x in a.items(): 228 for x in a.iteritems():
229 print(x) 229 print(x)
230 print("--") 230 print("--")
231 print("b", b) 231 print("b", b)
232 for x in b.items(): 232 for x in b.iteritems():
233 print(x) 233 print(x)
234 print() 234 print()
235 235
@@ -244,22 +244,22 @@ if __name__ == "__main__":
244 a['set'].add("o2") 244 a['set'].add("o2")
245 245
246 print("a", a) 246 print("a", a)
247 for x in a['set'].values(): 247 for x in a['set'].itervalues():
248 print(x) 248 print(x)
249 print("--") 249 print("--")
250 print("b", b) 250 print("b", b)
251 for x in b['set'].values(): 251 for x in b['set'].itervalues():
252 print(x) 252 print(x)
253 print() 253 print()
254 254
255 b['set'].add('o3') 255 b['set'].add('o3')
256 256
257 print("a", a) 257 print("a", a)
258 for x in a['set'].values(): 258 for x in a['set'].itervalues():
259 print(x) 259 print(x)
260 print("--") 260 print("--")
261 print("b", b) 261 print("b", b)
262 for x in b['set'].values(): 262 for x in b['set'].itervalues():
263 print(x) 263 print(x)
264 print() 264 print()
265 265
@@ -269,7 +269,7 @@ if __name__ == "__main__":
269 a['set2'].add("o2") 269 a['set2'].add("o2")
270 270
271 print("a", a) 271 print("a", a)
272 for x in a.items(): 272 for x in a.iteritems():
273 print(x) 273 print(x)
274 print("--") 274 print("--")
275 print("b", b) 275 print("b", b)
@@ -289,7 +289,7 @@ if __name__ == "__main__":
289 print("Yay - has_key with delete works!") 289 print("Yay - has_key with delete works!")
290 290
291 print("a", a) 291 print("a", a)
292 for x in a.items(): 292 for x in a.iteritems():
293 print(x) 293 print(x)
294 print("--") 294 print("--")
295 print("b", b) 295 print("b", b)
@@ -300,7 +300,7 @@ if __name__ == "__main__":
300 b.__revertitem__('b') 300 b.__revertitem__('b')
301 301
302 print("a", a) 302 print("a", a)
303 for x in a.items(): 303 for x in a.iteritems():
304 print(x) 304 print(x)
305 print("--") 305 print("--")
306 print("b", b) 306 print("b", b)
@@ -310,7 +310,7 @@ if __name__ == "__main__":
310 310
311 b.__revertitem__('dict') 311 b.__revertitem__('dict')
312 print("a", a) 312 print("a", a)
313 for x in a.items(): 313 for x in a.iteritems():
314 print(x) 314 print(x)
315 print("--") 315 print("--")
316 print("b", b) 316 print("b", b)