usertools: fix CPU layout with python 3
authorThomas Monjalon <thomas@monjalon.net>
Sun, 30 Apr 2017 14:11:40 +0000 (16:11 +0200)
committerThomas Monjalon <thomas@monjalon.net>
Mon, 1 May 2017 22:17:40 +0000 (00:17 +0200)
commitc9208f1dc96701c8d373681d93853b4631b03a2e
tree6a8dd541d26467b4bac0b6d90c77a8cbdd250b3c
parentdf86b009dd7099d2a373f3eddbe5ca997dacace3
usertools: fix CPU layout with python 3

These differences in Python 3 were causing errors:
- xrange is replaced by range
- dict values are a view (instead of list)
- has_key is removed

Fixes: deb87e6777c0 ("usertools: use sysfs for CPU layout")
Fixes: 63985c5f104e ("usertools: fix CPU layout for more than 2 threads")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: Gowrishankar Muthukrishnan <gowrishankar.m@linux.vnet.ibm.com>
usertools/cpu_layout.py