virt-manager/0002-virtinst-python3-avoid-comparison-of-None-and-int.patch
Charles Arnold 8d6890f068 - Update to virt-manager 2.1.0 (fate#326786)
virt-manager-2.1.0.tar.bz2
  virtman-fix-env-script-interpreter.patch
  * Bash autocompletion support (Lin Ma, Cole Robinson)
  * UI and command line –vsock support (Slavomir Kaslev)
  * virt-xml: Add –os-variant option (Andrea Bolognani)
  * virt-install: use libosinfo cpu, mem, disk size defaults (Fabiano Fidencio)
  * virt-install: Better usage of libosinfo -unknown distro IDs (Fabiano Fidencio)
  * virt-install: More usage of libosinfo for ISO –location detection
  * virt-install: Add –location LOCATION,kernel=X,initrd=Y for pointing to kernel/initrd in media that virt-install/libosinfo fails to detect
- Drop
  25b88733-urldetect-Dont-overload-suse_content-variable.patch
  9308bae3-util-Fix-typo-vpcu-vcpu.patch
  b8aff280-virtinst-quickfix-ubuntu-net-preseed-insert-cdrom-error.patch
  c30b3bc6-increase-timeout-for-vm-to-start.patch
  virtinst-use-latest-opensuse-version-when-unknown-media.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=456
2019-02-04 18:46:20 +00:00

39 lines
1.5 KiB
Diff

From cb90bbc8671aa25e23e55341745cc2682547e5f0 Mon Sep 17 00:00:00 2001
From: Martin Wilck <mwilck@suse.com>
Date: Thu, 7 Dec 2017 11:17:03 +0100
Subject: [PATCH 2/4] virtinst: python3: avoid comparison of None and int
This avoids the following error in python3:
File "/usr/share/virt-manager/virtinst/progress.py", line 249, in _do_update
ave_dl = format_number(self.re.average_rate())
File "/usr/share/virt-manager/virtinst/progress.py", line 481, in format_number
while number > thresh and depth < max_depth:
TypeError: '>' not supported between instances of 'NoneType' and 'int'
---
virtinst/progress.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Index: virt-manager-2.1.0/virtinst/progress.py
===================================================================
--- virt-manager-2.1.0.orig/virtinst/progress.py
+++ virt-manager-2.1.0/virtinst/progress.py
@@ -350,7 +350,7 @@ class RateEstimator:
self.start_time = now
self.last_update_time = now
self.last_amount_read = 0
- self.ave_rate = None
+ self.ave_rate = 0
def update(self, amount_read, now=None):
if now is None:
@@ -363,7 +363,7 @@ class RateEstimator:
# if we just started this file, all bets are off
self.last_update_time = now
self.last_amount_read = amount_read
- self.ave_rate = None
+ self.ave_rate = 0
return
time_diff = now - self.last_update_time