int() with base 16 will cause problem when cpu number bigger than 10, so change it as default with base 10. Signed-off-by: Wayne Sun <gsun@xxxxxxxxxx> --- repos/domain/cpu_affinity.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/repos/domain/cpu_affinity.py b/repos/domain/cpu_affinity.py index ee585e6..e710968 100644 --- a/repos/domain/cpu_affinity.py +++ b/repos/domain/cpu_affinity.py @@ -151,7 +151,7 @@ def vcpu_affinity_check(domain_name, vcpu, expected_pinned_cpu, hypervisor): task_list = output.split('\n')[1:] vcpu_task = task_list[int(vcpu)] - actual_pinned_cpu = int(vcpu_task.split('\t')[1], 16) + actual_pinned_cpu = int(vcpu_task.split('\t')[1]) elif 'el5' in host_kernel_version: cmd_get_task_list = "grep Cpus_allowed /proc/%s/task/*/status" % pid status, output = commands.getstatusoutput(cmd_get_task_list) -- 1.7.1 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list