]> git.baikalelectronics.ru Git - kernel.git/commit
tools/kvm_stat: Add Python 3 support to kvm_stat
authorJeremy Cline <jeremy@jcline.org>
Wed, 4 Oct 2017 03:08:11 +0000 (03:08 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 12 Oct 2017 12:01:50 +0000 (14:01 +0200)
commit6ba65dec1b56051134439e184c6859952e47a967
tree6e901deff651e857b9f5f12cebcd599c0095249e
parent25a72d7b11d9c5404b817cf17179791d839fa9c6
tools/kvm_stat: Add Python 3 support to kvm_stat

Make kvm_stat support Python 3 by changing the use of "print" to a
function rather than a statement, switching from "iteritems" and
"iterkeys" (removed in Python 3) to "items" and "keys" respectively,
and decoding bytes to strings when dealing with text.

With this change, kvm_stat is usable with Python 2.6 and greater.

Signed-off-by: Jeremy Cline <jeremy@jcline.org>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
tools/kvm/kvm_stat/kvm_stat