Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15-SP2:Update
kvm_stat
0045-tools-kvm_stat-fix-python3-issues.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0045-tools-kvm_stat-fix-python3-issues.patch of Package kvm_stat
From 11c9adb22aa804348b48807ecba10d40878858be Mon Sep 17 00:00:00 2001 From: Stefan Raspl <stefan.raspl@de.ibm.com> Date: Fri, 24 Aug 2018 14:03:55 +0200 Subject: [PATCH] tools/kvm_stat: fix python3 issues MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Python3 returns a float for a regular division - switch to a division operator that returns an integer. Furthermore, filters return a generator object instead of the actual list - wrap result in yet another list, which makes it still work in both, Python2 and 3. Signed-off-by: Stefan Raspl <raspl@linux.ibm.com> Signed-off-by: Radim Krčmář <rkrcmar@redhat.com> (cherry picked from commit 58f33cfe73076b6497bada4f7b5bda961ed68083) [BR: BSC#1116822] Signed-off-by: Bruce Rogers <brogers@suse.com> --- tools/kvm/kvm_stat/kvm_stat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/kvm/kvm_stat/kvm_stat b/tools/kvm/kvm_stat/kvm_stat index 313ebb4bec6b..789fa3ad5508 100755 --- a/tools/kvm/kvm_stat/kvm_stat +++ b/tools/kvm/kvm_stat/kvm_stat @@ -762,7 +762,7 @@ class DebugfsProvider(Provider): if len(vms) == 0: self.do_read = False - self.paths = filter(lambda x: "{}-".format(pid) in x, vms) + self.paths = list(filter(lambda x: "{}-".format(pid) in x, vms)) else: self.paths = [] -- 2.19.1
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor