virt-manager/0002-virtinst-python3-avoid-comparison-of-None-and-int.patch
Charles Arnold 674d49879e - Update to virt-manager 2.0.0 (bsc#1027942)
virt-manager-2.0.0.tar.bz2
  * Finish port to Python 3 (Radostin Stoyanov, Cole Robinson)
  * Improved VM defaults for supported OS: q35 PCIe, usb3, CPU host-model
  * Search based OS selection UI for new VMs (Daniel P. Berrangé, Cole Robinson)
  * Track OS name for lifetime of domain in XML
  * Host interface management UI has been completely removed
  * Show domain IP on interface details page (Lin Ma, Cole Robinson)
  * More efficient stats polling with AllDomainStats (Simon Kobyda, Cole Robinson)
  * TPM device model and backend UI (Marc-André Lureau, Stefan Berger)
  * Show connection state in UI (Lin Ma)
  * Show attached devices in UI (Lin Ma)
  * UI option to plug/unplug VM nic link (Simon Kobyda)
  * UI support for disk discard and detect_zeroes (Povilas Kanapickas, Lin Ma)
  * Improved SUSE –location URL/ISO detection (Charles Arnold)
  * cli and UI support for SCSI persistent reservations (Lin Ma)
  * cli: Add –network mtu.size= option (Anya Harter)
  * cli: Add –disk driver.copy_on_read (Anya Harter)
  * cli: Add –disk geometry support (Anya Harter)
  * cli: Add –sound codec support (Anya Harter)
  * cli: Add –hostdev net/char/block for LXC (Lubomir Rintel)
  * cli: Add –memorybacking access_mode and source_type (Marc-André Lureau)
  * cli: Add –boot rebootTimout (Yossi Ovadia)
  * cli: Add –boot bootloader=
  * cli: Add –destroy-on-exit
- Drop patches contained in new tarball or not required
  0004-virtinst-python3-use-binary-mode-for-kernel.patch
  27d4b167-virtinst-update-location-for-opensuse.patch
  5a7698c7-fix-select-network-vol.patch
  d15b78ab-virtinst-read-CPU-model-from-domain-capabilities.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=437
2018-10-30 22:00:52 +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.0.0/virtinst/progress.py
===================================================================
--- virt-manager-2.0.0.orig/virtinst/progress.py
+++ virt-manager-2.0.0/virtinst/progress.py
@@ -321,7 +321,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: now = time.time()
@@ -333,7 +333,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
#print 'times', now, self.last_update_time