- bsc#1070896 - virt-manager will not run on a python3 only system
virtcli-python2-to-python3-conversion.patch virtconv-python2-to-python3-conversion.patch virtinst-python2-to-python3-conversion.patch virtman-python2-to-python3-conversion.patch virtmisc-python2-to-python3-conversion.patch virttests-python2-to-python3-conversion.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=381
This commit is contained in:
parent
47dab25b0a
commit
cd5a32c5f9
@ -1,3 +1,14 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Dec 2 18:41:22 MST 2017 - carnold@suse.com
|
||||||
|
|
||||||
|
- bsc#1070896 - virt-manager will not run on a python3 only system
|
||||||
|
virtcli-python2-to-python3-conversion.patch
|
||||||
|
virtconv-python2-to-python3-conversion.patch
|
||||||
|
virtinst-python2-to-python3-conversion.patch
|
||||||
|
virtman-python2-to-python3-conversion.patch
|
||||||
|
virtmisc-python2-to-python3-conversion.patch
|
||||||
|
virttests-python2-to-python3-conversion.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Nov 28 08:24:39 MST 2017 - carnold@suse.com
|
Tue Nov 28 08:24:39 MST 2017 - carnold@suse.com
|
||||||
|
|
||||||
|
@ -115,6 +115,13 @@ Patch166: virtinst-check-date-format.patch
|
|||||||
Patch167: virtinst-no-usb-tablet-for-xenpv.patch
|
Patch167: virtinst-no-usb-tablet-for-xenpv.patch
|
||||||
Patch168: virtinst-add-sle15-detection-support.patch
|
Patch168: virtinst-add-sle15-detection-support.patch
|
||||||
Patch169: virtinst-keep-install-iso-attached.patch
|
Patch169: virtinst-keep-install-iso-attached.patch
|
||||||
|
# Python2 to Python3 patches
|
||||||
|
Patch200: virtmisc-python2-to-python3-conversion.patch
|
||||||
|
Patch201: virtcli-python2-to-python3-conversion.patch
|
||||||
|
Patch202: virtconv-python2-to-python3-conversion.patch
|
||||||
|
Patch203: virtinst-python2-to-python3-conversion.patch
|
||||||
|
Patch204: virtman-python2-to-python3-conversion.patch
|
||||||
|
Patch205: virttests-python2-to-python3-conversion.patch
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
|
||||||
@ -123,10 +130,10 @@ Requires: dbus-1-x11
|
|||||||
Requires: dconf
|
Requires: dconf
|
||||||
Requires: gtk3
|
Requires: gtk3
|
||||||
Requires: python-gconf
|
Requires: python-gconf
|
||||||
Requires: python-gobject-Gdk
|
Requires: python3-gobject-Gdk
|
||||||
# For console widget
|
# For console widget
|
||||||
Requires: python-gobject-cairo
|
Requires: python3-gobject-cairo
|
||||||
Recommends: python-SpiceClientGtk
|
Recommends: python3-SpiceClientGtk
|
||||||
Requires: virt-install
|
Requires: virt-install
|
||||||
Requires: virt-manager-common = %{verrel}
|
Requires: virt-manager-common = %{verrel}
|
||||||
%if 0%{?is_opensuse} == 1
|
%if 0%{?is_opensuse} == 1
|
||||||
@ -135,14 +142,14 @@ Requires: yast2-branding-openSUSE
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{with_guestfs}
|
%if %{with_guestfs}
|
||||||
Requires: python-libguestfs
|
Requires: python3-libguestfs
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
BuildRequires: glib2-devel
|
BuildRequires: glib2-devel
|
||||||
BuildRequires: gtk2-tools
|
BuildRequires: gtk2-tools
|
||||||
BuildRequires: intltool
|
BuildRequires: intltool
|
||||||
BuildRequires: perl
|
BuildRequires: perl
|
||||||
BuildRequires: python
|
BuildRequires: python3
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Virtual Machine Manager provides a graphical tool for administering virtual
|
Virtual Machine Manager provides a graphical tool for administering virtual
|
||||||
@ -159,10 +166,10 @@ Group: System/Monitoring
|
|||||||
# This version not strictly required: virt-manager should work with older,
|
# This version not strictly required: virt-manager should work with older,
|
||||||
# however varying amounts of functionality will not be enabled.
|
# however varying amounts of functionality will not be enabled.
|
||||||
Requires: libosinfo >= 0.2.10
|
Requires: libosinfo >= 0.2.10
|
||||||
Requires: python-ipaddr
|
Requires: python3-ipaddr
|
||||||
Requires: python-libvirt-python >= 0.7.0
|
Requires: python3-libvirt-python >= 0.7.0
|
||||||
Requires: python-libxml2
|
Requires: python3-libxml2-python
|
||||||
Requires: python-urlgrabber
|
Requires: python3-pycurl
|
||||||
Requires: typelib(LibvirtGLib)
|
Requires: typelib(LibvirtGLib)
|
||||||
Recommends: python3-virt-bootstrap
|
Recommends: python3-virt-bootstrap
|
||||||
BuildRequires: gobject-introspection
|
BuildRequires: gobject-introspection
|
||||||
@ -182,8 +189,8 @@ Group: System/Monitoring
|
|||||||
|
|
||||||
Requires: virt-manager-common = %{verrel}
|
Requires: virt-manager-common = %{verrel}
|
||||||
|
|
||||||
Requires: python-requests
|
Requires: python3-requests
|
||||||
Provides: python-virtinst
|
Provides: python3-virtinst
|
||||||
Provides: virt-clone
|
Provides: virt-clone
|
||||||
Provides: virt-convert
|
Provides: virt-convert
|
||||||
Obsoletes: python-virtinst <= 0.600.4
|
Obsoletes: python-virtinst <= 0.600.4
|
||||||
@ -275,6 +282,13 @@ machine).
|
|||||||
%patch167 -p1
|
%patch167 -p1
|
||||||
%patch168 -p1
|
%patch168 -p1
|
||||||
%patch169 -p1
|
%patch169 -p1
|
||||||
|
# Python2 to Python3 patches
|
||||||
|
%patch200 -p1
|
||||||
|
%patch201 -p1
|
||||||
|
%patch202 -p1
|
||||||
|
%patch203 -p1
|
||||||
|
%patch204 -p1
|
||||||
|
%patch205 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%if %{qemu_user}
|
%if %{qemu_user}
|
||||||
@ -301,7 +315,7 @@ machine).
|
|||||||
%define _askpass_package --askpass-package-names=%{askpass_package}
|
%define _askpass_package --askpass-package-names=%{askpass_package}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
python setup.py configure \
|
python3 setup.py configure \
|
||||||
--prefix=%{_prefix} \
|
--prefix=%{_prefix} \
|
||||||
--default-graphics="spice" \
|
--default-graphics="spice" \
|
||||||
%{?_qemu_user} \
|
%{?_qemu_user} \
|
||||||
@ -313,7 +327,7 @@ python setup.py configure \
|
|||||||
%{?_default_graphics}
|
%{?_default_graphics}
|
||||||
|
|
||||||
%install
|
%install
|
||||||
python setup.py \
|
python3 setup.py \
|
||||||
--no-update-icon-cache \
|
--no-update-icon-cache \
|
||||||
--no-compile-schemas install \
|
--no-compile-schemas install \
|
||||||
--prefix=%{_prefix} \
|
--prefix=%{_prefix} \
|
||||||
|
27
virtcli-python2-to-python3-conversion.patch
Normal file
27
virtcli-python2-to-python3-conversion.patch
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
Index: virt-manager-1.4.3/virtcli/cliconfig.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.4.3.orig/virtcli/cliconfig.py
|
||||||
|
+++ virt-manager-1.4.3/virtcli/cliconfig.py
|
||||||
|
@@ -21,11 +21,11 @@
|
||||||
|
Configuration variables that can be set at build time
|
||||||
|
"""
|
||||||
|
|
||||||
|
-import ConfigParser
|
||||||
|
+import configparser
|
||||||
|
import os
|
||||||
|
|
||||||
|
|
||||||
|
-_cfg = ConfigParser.ConfigParser()
|
||||||
|
+_cfg = configparser.ConfigParser()
|
||||||
|
_filepath = os.path.abspath(__file__)
|
||||||
|
_srcdir = os.path.abspath(os.path.join(os.path.dirname(_filepath), ".."))
|
||||||
|
_cfgpath = os.path.join(os.path.dirname(_filepath), "cli.cfg")
|
||||||
|
@@ -46,7 +46,7 @@ def _get_param(name, default):
|
||||||
|
return default
|
||||||
|
try:
|
||||||
|
return _cfg.get("config", name)
|
||||||
|
- except (ConfigParser.NoOptionError, ConfigParser.NoSectionError):
|
||||||
|
+ except (configparser.NoOptionError, configparser.NoSectionError):
|
||||||
|
return default
|
||||||
|
|
||||||
|
|
49
virtconv-python2-to-python3-conversion.patch
Normal file
49
virtconv-python2-to-python3-conversion.patch
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
Index: virt-manager-1.4.3/virt-convert
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.4.3.orig/virt-convert
|
||||||
|
+++ virt-manager-1.4.3/virt-convert
|
||||||
|
@@ -1,4 +1,4 @@
|
||||||
|
-#!/usr/bin/env python2
|
||||||
|
+#!/usr/bin/python3
|
||||||
|
#
|
||||||
|
# Copyright 2008, 2013, 2014 Red Hat, Inc.
|
||||||
|
# Joey Boggs <jboggs@redhat.com>
|
||||||
|
Index: virt-manager-1.4.3/virtconv/vmx.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.4.3.orig/virtconv/vmx.py
|
||||||
|
+++ virt-manager-1.4.3/virtconv/vmx.py
|
||||||
|
@@ -271,7 +271,7 @@ class vmx_parser(parser_class):
|
||||||
|
|
||||||
|
def _find_keys(prefixes):
|
||||||
|
ret = []
|
||||||
|
- for key, value in config.items():
|
||||||
|
+ for key, value in list(config.items()):
|
||||||
|
for p in util.listify(prefixes):
|
||||||
|
if key.startswith(p):
|
||||||
|
ret.append((key, value))
|
||||||
|
Index: virt-manager-1.4.3/virtconv/ovf.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.4.3.orig/virtconv/ovf.py
|
||||||
|
+++ virt-manager-1.4.3/virtconv/ovf.py
|
||||||
|
@@ -90,7 +90,7 @@ def node_list(node):
|
||||||
|
child = node.children
|
||||||
|
while child:
|
||||||
|
child_list.append(child)
|
||||||
|
- child = child.next
|
||||||
|
+ child = child.__next__
|
||||||
|
return child_list
|
||||||
|
|
||||||
|
|
||||||
|
Index: virt-manager-1.4.3/virtconv/formats.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.4.3.orig/virtconv/formats.py
|
||||||
|
+++ virt-manager-1.4.3/virtconv/formats.py
|
||||||
|
@@ -19,7 +19,7 @@
|
||||||
|
# MA 02110-1301 USA.
|
||||||
|
#
|
||||||
|
|
||||||
|
-from __future__ import print_function
|
||||||
|
+
|
||||||
|
|
||||||
|
from distutils.spawn import find_executable
|
||||||
|
import logging
|
581
virtinst-python2-to-python3-conversion.patch
Normal file
581
virtinst-python2-to-python3-conversion.patch
Normal file
@ -0,0 +1,581 @@
|
|||||||
|
Index: virt-manager-1.4.3/virt-install
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.4.3.orig/virt-install
|
||||||
|
+++ virt-manager-1.4.3/virt-install
|
||||||
|
@@ -1,4 +1,4 @@
|
||||||
|
-#!/usr/bin/env python2
|
||||||
|
+#!/usr/bin/python3
|
||||||
|
#
|
||||||
|
# Copyright 2005-2014 Red Hat, Inc.
|
||||||
|
#
|
||||||
|
Index: virt-manager-1.4.3/virtinst/uri.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.4.3.orig/virtinst/uri.py
|
||||||
|
+++ virt-manager-1.4.3/virtinst/uri.py
|
||||||
|
@@ -19,7 +19,7 @@
|
||||||
|
|
||||||
|
import logging
|
||||||
|
import re
|
||||||
|
-import urllib
|
||||||
|
+import urllib.request, urllib.parse, urllib.error
|
||||||
|
|
||||||
|
from .cli import parse_optstr_tuples
|
||||||
|
|
||||||
|
@@ -47,7 +47,7 @@ class URI(object):
|
||||||
|
"""
|
||||||
|
def __init__(self, uri):
|
||||||
|
self.uri = uri
|
||||||
|
- unquoted_uri = urllib.unquote(uri)
|
||||||
|
+ unquoted_uri = urllib.parse.unquote(uri)
|
||||||
|
|
||||||
|
(self.scheme, self.username, self.hostname,
|
||||||
|
self.path, self.query, self.fragment) = self._split(unquoted_uri)
|
||||||
|
Index: virt-manager-1.4.3/virtinst/hostkeymap.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.4.3.orig/virtinst/hostkeymap.py
|
||||||
|
+++ virt-manager-1.4.3/virtinst/hostkeymap.py
|
||||||
|
@@ -202,7 +202,7 @@ def sanitize_keymap(kt):
|
||||||
|
return len(b) - len(a)
|
||||||
|
|
||||||
|
clean_kt = kt.replace("-", "").replace("_", "")
|
||||||
|
- sorted_keys = sorted(keytable.keys(), len_cmp)
|
||||||
|
+ sorted_keys = sorted(list(keytable.keys()), len_cmp)
|
||||||
|
|
||||||
|
for key in sorted_keys:
|
||||||
|
origkey = key
|
||||||
|
Index: virt-manager-1.4.3/virtinst/support.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.4.3.orig/virtinst/support.py
|
||||||
|
+++ virt-manager-1.4.3/virtinst/support.py
|
||||||
|
@@ -167,7 +167,7 @@ class _SupportCheck(object):
|
||||||
|
self.hv_version = hv_version or {}
|
||||||
|
self.hv_libvirt_version = hv_libvirt_version or {}
|
||||||
|
|
||||||
|
- versions = ([self.version] + self.hv_libvirt_version.values())
|
||||||
|
+ versions = ([self.version] + list(self.hv_libvirt_version.values()))
|
||||||
|
for vstr in versions:
|
||||||
|
v = _version_str_to_int(vstr)
|
||||||
|
if vstr is not None and v != 0 and v < 7009:
|
||||||
|
Index: virt-manager-1.4.3/virtinst/osdict.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.4.3.orig/virtinst/osdict.py
|
||||||
|
+++ virt-manager-1.4.3/virtinst/osdict.py
|
||||||
|
@@ -79,7 +79,7 @@ def _sort(tosort, sortpref=None, limit_p
|
||||||
|
retlist = []
|
||||||
|
sortpref = sortpref or []
|
||||||
|
|
||||||
|
- for key, osinfo in tosort.items():
|
||||||
|
+ for key, osinfo in list(tosort.items()):
|
||||||
|
# Libosinfo has some duplicate version numbers here, so append .1
|
||||||
|
# if there's a collision
|
||||||
|
sortby = osinfo.sortby
|
||||||
|
@@ -98,12 +98,12 @@ def _sort(tosort, sortpref=None, limit_p
|
||||||
|
# debian5, debian4, fedora14, fedora13
|
||||||
|
# rather than
|
||||||
|
# debian4, debian5, fedora13, fedora14
|
||||||
|
- for distro_list in distro_mappings.values():
|
||||||
|
+ for distro_list in list(distro_mappings.values()):
|
||||||
|
distro_list.sort()
|
||||||
|
distro_list.reverse()
|
||||||
|
|
||||||
|
# Move the sortpref values to the front of the list
|
||||||
|
- sorted_distro_list = distro_mappings.keys()
|
||||||
|
+ sorted_distro_list = list(distro_mappings.keys())
|
||||||
|
sorted_distro_list.sort()
|
||||||
|
sortpref.reverse()
|
||||||
|
for prefer in sortpref:
|
||||||
|
@@ -258,7 +258,7 @@ class _OSDB(object):
|
||||||
|
"""
|
||||||
|
sortmap = {}
|
||||||
|
|
||||||
|
- for name, osobj in self._all_variants.items():
|
||||||
|
+ for name, osobj in list(self._all_variants.items()):
|
||||||
|
if typename and typename != osobj.get_typename():
|
||||||
|
continue
|
||||||
|
if only_supported and not osobj.get_supported():
|
||||||
|
Index: virt-manager-1.4.3/virtinst/guest.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.4.3.orig/virtinst/guest.py
|
||||||
|
+++ virt-manager-1.4.3/virtinst/guest.py
|
||||||
|
@@ -434,7 +434,7 @@ class Guest(XMLBuilder):
|
||||||
|
domain.undefine()
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
|
- raise exc_info[0], exc_info[1], exc_info[2]
|
||||||
|
+ raise exc_info[0](exc_info[1]).with_traceback(exc_info[2])
|
||||||
|
|
||||||
|
if install_xml and install_xml != final_xml:
|
||||||
|
domain = self.conn.defineXML(final_xml)
|
||||||
|
@@ -1075,7 +1075,7 @@ class Guest(XMLBuilder):
|
||||||
|
(str(d), str(addresses[addrstr][addr.function])))
|
||||||
|
addresses[addrstr][addr.function] = d
|
||||||
|
|
||||||
|
- for devs in addresses.values():
|
||||||
|
+ for devs in list(addresses.values()):
|
||||||
|
if len(devs) > 1 and 0 in devs:
|
||||||
|
devs[0].address.multifunction = True
|
||||||
|
|
||||||
|
Index: virt-manager-1.4.3/virtinst/distroinstaller.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.4.3.orig/virtinst/distroinstaller.py
|
||||||
|
+++ virt-manager-1.4.3/virtinst/distroinstaller.py
|
||||||
|
@@ -68,7 +68,7 @@ def _sanitize_url(url):
|
||||||
|
MEDIA_LOCATION_URL,
|
||||||
|
MEDIA_CDROM_PATH,
|
||||||
|
MEDIA_CDROM_URL,
|
||||||
|
- MEDIA_CDROM_IMPLIED) = range(1, 7)
|
||||||
|
+ MEDIA_CDROM_IMPLIED) = list(range(1, 7))
|
||||||
|
|
||||||
|
|
||||||
|
class DistroInstaller(Installer):
|
||||||
|
Index: virt-manager-1.4.3/virtinst/cli.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.4.3.orig/virtinst/cli.py
|
||||||
|
+++ virt-manager-1.4.3/virtinst/cli.py
|
||||||
|
@@ -19,7 +19,7 @@
|
||||||
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
|
# MA 02110-1301 USA.
|
||||||
|
|
||||||
|
-from __future__ import print_function
|
||||||
|
+
|
||||||
|
|
||||||
|
import argparse
|
||||||
|
import collections
|
||||||
|
@@ -293,7 +293,7 @@ def _do_creds_authname(creds):
|
||||||
|
|
||||||
|
res = cred[retindex]
|
||||||
|
if credtype == libvirt.VIR_CRED_AUTHNAME:
|
||||||
|
- res = raw_input(prompt)
|
||||||
|
+ res = input(prompt)
|
||||||
|
elif credtype == libvirt.VIR_CRED_PASSPHRASE:
|
||||||
|
import getpass
|
||||||
|
res = getpass.getpass(prompt)
|
||||||
|
@@ -1159,7 +1159,7 @@ class VirtCLIParser(object):
|
||||||
|
passed an invalid argument such as --disk idontexist=foo
|
||||||
|
"""
|
||||||
|
if optdict:
|
||||||
|
- fail(_("Unknown options %s") % optdict.keys())
|
||||||
|
+ fail(_("Unknown options %s") % list(optdict.keys()))
|
||||||
|
|
||||||
|
def _parse(self, inst):
|
||||||
|
"""
|
||||||
|
@@ -1616,7 +1616,7 @@ class ParserBoot(VirtCLIParser):
|
||||||
|
def _parse(self, inst):
|
||||||
|
# Build boot order
|
||||||
|
boot_order = []
|
||||||
|
- for cliname in self.optdict.keys():
|
||||||
|
+ for cliname in list(self.optdict.keys()):
|
||||||
|
if cliname not in inst.os.BOOT_DEVICES:
|
||||||
|
continue
|
||||||
|
|
||||||
|
Index: virt-manager-1.4.3/virtinst/xmlbuilder.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.4.3.orig/virtinst/xmlbuilder.py
|
||||||
|
+++ virt-manager-1.4.3/virtinst/xmlbuilder.py
|
||||||
|
@@ -327,7 +327,7 @@ class XMLChildProperty(property):
|
||||||
|
|
||||||
|
def _findpropname(self, xmlbuilder):
|
||||||
|
if self._propname is None:
|
||||||
|
- for key, val in xmlbuilder._all_child_props().items():
|
||||||
|
+ for key, val in list(xmlbuilder._all_child_props().items()):
|
||||||
|
if val is self:
|
||||||
|
self._propname = key
|
||||||
|
break
|
||||||
|
@@ -475,7 +475,7 @@ class XMLProperty(property):
|
||||||
|
as in the XMLBuilder class. This is just for debug purposes.
|
||||||
|
"""
|
||||||
|
if self._propname is None:
|
||||||
|
- for key, val in xmlbuilder._all_xml_props().items():
|
||||||
|
+ for key, val in list(xmlbuilder._all_xml_props().items()):
|
||||||
|
if val is self:
|
||||||
|
self._propname = key
|
||||||
|
break
|
||||||
|
@@ -829,7 +829,7 @@ class XMLBuilder(object):
|
||||||
|
self.conn = conn
|
||||||
|
|
||||||
|
if self._XML_SANITIZE:
|
||||||
|
- parsexml = parsexml.decode('ascii', 'ignore').encode('ascii')
|
||||||
|
+ #parsexml = parsexml.decode('ascii', 'ignore').encode('ascii')
|
||||||
|
parsexml = "".join([c for c in parsexml if c in string.printable])
|
||||||
|
|
||||||
|
self._propstore = {}
|
||||||
|
@@ -843,7 +843,7 @@ class XMLBuilder(object):
|
||||||
|
def _initial_child_parse(self):
|
||||||
|
# Walk the XML tree and hand of parsing to any registered
|
||||||
|
# child classes
|
||||||
|
- for xmlprop in self._all_child_props().values():
|
||||||
|
+ for xmlprop in list(self._all_child_props().values()):
|
||||||
|
if xmlprop.is_single:
|
||||||
|
child_class = xmlprop.child_classes[0]
|
||||||
|
prop_path = xmlprop.get_prop_xpath(self, child_class)
|
||||||
|
@@ -885,7 +885,7 @@ class XMLBuilder(object):
|
||||||
|
|
||||||
|
# XMLChildProperty stores a list in propstore, which dict shallow
|
||||||
|
# copy won't fix for us.
|
||||||
|
- for name, value in ret._propstore.items():
|
||||||
|
+ for name, value in list(ret._propstore.items()):
|
||||||
|
if not isinstance(value, list):
|
||||||
|
continue
|
||||||
|
ret._propstore[name] = [obj.copy() for obj in ret._propstore[name]]
|
||||||
|
@@ -926,8 +926,8 @@ class XMLBuilder(object):
|
||||||
|
if leave_stub:
|
||||||
|
_top_node = _get_xpath_node(self._xmlstate.xml_ctx,
|
||||||
|
self.get_root_xpath())
|
||||||
|
- props = self._all_xml_props().values()
|
||||||
|
- props += self._all_child_props().values()
|
||||||
|
+ props = list(self._all_xml_props().values())
|
||||||
|
+ props += list(self._all_child_props().values())
|
||||||
|
for prop in props:
|
||||||
|
prop.clear(self)
|
||||||
|
finally:
|
||||||
|
@@ -990,7 +990,7 @@ class XMLBuilder(object):
|
||||||
|
if not hasattr(self.__class__, cachename):
|
||||||
|
ret = {}
|
||||||
|
for c in reversed(type.mro(self.__class__)[:-1]):
|
||||||
|
- for key, val in c.__dict__.items():
|
||||||
|
+ for key, val in list(c.__dict__.items()):
|
||||||
|
if isinstance(val, checkclass):
|
||||||
|
ret[key] = val
|
||||||
|
setattr(self.__class__, cachename, ret)
|
||||||
|
@@ -1025,7 +1025,7 @@ class XMLBuilder(object):
|
||||||
|
|
||||||
|
def _find_child_prop(self, child_class, return_single=False):
|
||||||
|
xmlprops = self._all_child_props()
|
||||||
|
- for xmlprop in xmlprops.values():
|
||||||
|
+ for xmlprop in list(xmlprops.values()):
|
||||||
|
if xmlprop.is_single and not return_single:
|
||||||
|
continue
|
||||||
|
if child_class in xmlprop.child_classes:
|
||||||
|
@@ -1084,7 +1084,7 @@ class XMLBuilder(object):
|
||||||
|
Return a list of all XML child objects with the passed class
|
||||||
|
"""
|
||||||
|
ret = []
|
||||||
|
- for prop in self._all_child_props().values():
|
||||||
|
+ for prop in list(self._all_child_props().values()):
|
||||||
|
ret += [obj for obj in util.listify(prop._get(self))
|
||||||
|
if obj.__class__ == klass]
|
||||||
|
return ret
|
||||||
|
@@ -1107,7 +1107,7 @@ class XMLBuilder(object):
|
||||||
|
xpaths point at their particular element
|
||||||
|
"""
|
||||||
|
typecount = {}
|
||||||
|
- for propname, xmlprop in self._all_child_props().items():
|
||||||
|
+ for propname, xmlprop in list(self._all_child_props().items()):
|
||||||
|
for obj in util.listify(getattr(self, propname)):
|
||||||
|
idxstr = ""
|
||||||
|
if not xmlprop.is_single:
|
||||||
|
@@ -1165,7 +1165,7 @@ class XMLBuilder(object):
|
||||||
|
xmlprops = self._all_xml_props()
|
||||||
|
childprops = self._all_child_props()
|
||||||
|
|
||||||
|
- for prop in xmlprops.values():
|
||||||
|
+ for prop in list(xmlprops.values()):
|
||||||
|
prop._set_default(self)
|
||||||
|
|
||||||
|
# Set up preferred XML ordering
|
||||||
|
@@ -1180,7 +1180,7 @@ class XMLBuilder(object):
|
||||||
|
elif key in childprops:
|
||||||
|
do_order.insert(0, key)
|
||||||
|
|
||||||
|
- for key in childprops.keys():
|
||||||
|
+ for key in list(childprops.keys()):
|
||||||
|
if key not in do_order:
|
||||||
|
do_order.append(key)
|
||||||
|
|
||||||
|
Index: virt-manager-1.4.3/virtinst/domcapabilities.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.4.3.orig/virtinst/domcapabilities.py
|
||||||
|
+++ virt-manager-1.4.3/virtinst/domcapabilities.py
|
||||||
|
@@ -139,7 +139,7 @@ class DomainCapabilities(XMLBuilder):
|
||||||
|
return _("BIOS")
|
||||||
|
return _("None")
|
||||||
|
|
||||||
|
- for arch, patterns in self._uefi_arch_patterns.items():
|
||||||
|
+ for arch, patterns in list(self._uefi_arch_patterns.items()):
|
||||||
|
for pattern in patterns:
|
||||||
|
if re.match(pattern, path):
|
||||||
|
return (_("UEFI %(arch)s: %(path)s") %
|
||||||
|
@@ -151,7 +151,7 @@ class DomainCapabilities(XMLBuilder):
|
||||||
|
"""
|
||||||
|
Return True if we know how to setup UEFI for the passed arch
|
||||||
|
"""
|
||||||
|
- return self.arch in self._uefi_arch_patterns.keys()
|
||||||
|
+ return self.arch in list(self._uefi_arch_patterns.keys())
|
||||||
|
|
||||||
|
def supports_uefi_xml(self):
|
||||||
|
"""
|
||||||
|
Index: virt-manager-1.4.3/virtinst/devicedisk.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.4.3.orig/virtinst/devicedisk.py
|
||||||
|
+++ virt-manager-1.4.3/virtinst/devicedisk.py
|
||||||
|
@@ -87,7 +87,7 @@ def _is_dir_searchable(uid, username, pa
|
||||||
|
logging.debug("Cmd '%s' failed: %s", cmd, err)
|
||||||
|
return False
|
||||||
|
|
||||||
|
- return bool(re.search("user:%s:..x" % username, out))
|
||||||
|
+ return bool(re.search("user:%s:..x" % username, out.decode()))
|
||||||
|
|
||||||
|
|
||||||
|
class _DiskSeclabel(XMLBuilder):
|
||||||
|
@@ -445,7 +445,7 @@ class VirtualDisk(VirtualDevice):
|
||||||
|
digit = 1
|
||||||
|
|
||||||
|
seen_valid = True
|
||||||
|
- gen_t += "%c" % (ord('a') + digit - 1)
|
||||||
|
+ gen_t += "%c" % int(ord('a') + digit - 1)
|
||||||
|
|
||||||
|
return gen_t
|
||||||
|
|
||||||
|
@@ -1022,11 +1022,11 @@ class VirtualDisk(VirtualDevice):
|
||||||
|
def get_target():
|
||||||
|
first_found = None
|
||||||
|
|
||||||
|
- ran = range(maxnode)
|
||||||
|
+ ran = list(range(maxnode))
|
||||||
|
if pref_ctrl is not None:
|
||||||
|
# We assume narrow SCSI bus and libvirt assigning 7
|
||||||
|
# (1-7, 8-14, etc.) devices per controller
|
||||||
|
- ran = range(pref_ctrl * 7, (pref_ctrl + 1) * 7)
|
||||||
|
+ ran = list(range(pref_ctrl * 7, (pref_ctrl + 1) * 7))
|
||||||
|
|
||||||
|
for i in ran:
|
||||||
|
postfix = self.num_to_target(i + 1)
|
||||||
|
Index: virt-manager-1.4.3/virtinst/storage.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.4.3.orig/virtinst/storage.py
|
||||||
|
+++ virt-manager-1.4.3/virtinst/storage.py
|
||||||
|
@@ -130,7 +130,7 @@ class StoragePool(_StorageObject):
|
||||||
|
"""
|
||||||
|
Return list of appropriate pool types
|
||||||
|
"""
|
||||||
|
- return StoragePool._descs.keys()
|
||||||
|
+ return list(StoragePool._descs.keys())
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def get_pool_type_desc(pool_type):
|
||||||
|
Index: virt-manager-1.4.3/virtinst/devicegraphics.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.4.3.orig/virtinst/devicegraphics.py
|
||||||
|
+++ virt-manager-1.4.3/virtinst/devicegraphics.py
|
||||||
|
@@ -84,7 +84,7 @@ class VirtualGraphics(VirtualDevice):
|
||||||
|
"""
|
||||||
|
from . import hostkeymap
|
||||||
|
|
||||||
|
- orig_list = hostkeymap.keytable.values()
|
||||||
|
+ orig_list = list(hostkeymap.keytable.values())
|
||||||
|
sort_list = []
|
||||||
|
|
||||||
|
orig_list.sort()
|
||||||
|
Index: virt-manager-1.4.3/virtinst/util.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.4.3.orig/virtinst/util.py
|
||||||
|
+++ virt-manager-1.4.3/virtinst/util.py
|
||||||
|
@@ -147,7 +147,7 @@ def generate_name(base, collision_cb, su
|
||||||
|
else:
|
||||||
|
return collision_cb(tryname)
|
||||||
|
|
||||||
|
- numrange = range(start_num, start_num + 100000)
|
||||||
|
+ numrange = list(range(start_num, start_num + 100000))
|
||||||
|
if not force_num:
|
||||||
|
numrange = [None] + numrange
|
||||||
|
|
||||||
|
Index: virt-manager-1.4.3/virtinst/urlfetcher.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.4.3.orig/virtinst/urlfetcher.py
|
||||||
|
+++ virt-manager-1.4.3/virtinst/urlfetcher.py
|
||||||
|
@@ -19,7 +19,7 @@
|
||||||
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
|
# MA 02110-1301 USA.
|
||||||
|
|
||||||
|
-import ConfigParser
|
||||||
|
+import configparser
|
||||||
|
import ftplib
|
||||||
|
import io
|
||||||
|
import logging
|
||||||
|
@@ -28,8 +28,8 @@ import re
|
||||||
|
import stat
|
||||||
|
import subprocess
|
||||||
|
import tempfile
|
||||||
|
-import urllib2
|
||||||
|
-import urlparse
|
||||||
|
+import urllib.request, urllib.error, urllib.parse
|
||||||
|
+import urllib.parse
|
||||||
|
|
||||||
|
import requests
|
||||||
|
|
||||||
|
@@ -221,9 +221,13 @@ class _FTPURLFetcher(_URLFetcher):
|
||||||
|
return
|
||||||
|
|
||||||
|
try:
|
||||||
|
- parsed = urlparse.urlparse(self.location)
|
||||||
|
+ parsed = urllib.parse.urlparse(self.location)
|
||||||
|
self._ftp = ftplib.FTP()
|
||||||
|
- self._ftp.connect(parsed.hostname, parsed.port)
|
||||||
|
+ if parsed.port is None:
|
||||||
|
+ port = 0
|
||||||
|
+ else:
|
||||||
|
+ port = parsed.port
|
||||||
|
+ self._ftp.connect(parsed.hostname, port)
|
||||||
|
self._ftp.login()
|
||||||
|
# Force binary mode
|
||||||
|
self._ftp.voidcmd("TYPE I")
|
||||||
|
@@ -235,9 +239,9 @@ class _FTPURLFetcher(_URLFetcher):
|
||||||
|
"""
|
||||||
|
Use urllib2 and ftplib to grab the file
|
||||||
|
"""
|
||||||
|
- request = urllib2.Request(url)
|
||||||
|
- urlobj = urllib2.urlopen(request)
|
||||||
|
- size = self._ftp.size(urlparse.urlparse(url)[2])
|
||||||
|
+ request = urllib.request.Request(url)
|
||||||
|
+ urlobj = urllib.request.urlopen(request)
|
||||||
|
+ size = self._ftp.size(urllib.parse.urlparse(url)[2])
|
||||||
|
return urlobj, size
|
||||||
|
|
||||||
|
|
||||||
|
@@ -253,7 +257,7 @@ class _FTPURLFetcher(_URLFetcher):
|
||||||
|
self._ftp = None
|
||||||
|
|
||||||
|
def _hasFile(self, url):
|
||||||
|
- path = urlparse.urlparse(url)[2]
|
||||||
|
+ path = urllib.parse.urlparse(url)[2]
|
||||||
|
|
||||||
|
try:
|
||||||
|
try:
|
||||||
|
@@ -371,14 +375,14 @@ def _grabTreeinfo(fetcher):
|
||||||
|
return None
|
||||||
|
|
||||||
|
try:
|
||||||
|
- treeinfo = ConfigParser.SafeConfigParser()
|
||||||
|
+ treeinfo = configparser.SafeConfigParser()
|
||||||
|
treeinfo.read(tmptreeinfo)
|
||||||
|
finally:
|
||||||
|
os.unlink(tmptreeinfo)
|
||||||
|
|
||||||
|
try:
|
||||||
|
treeinfo.get("general", "family")
|
||||||
|
- except ConfigParser.NoSectionError:
|
||||||
|
+ except configparser.NoSectionError:
|
||||||
|
logging.debug("Did not find 'family' section in treeinfo")
|
||||||
|
return None
|
||||||
|
|
||||||
|
@@ -618,7 +622,7 @@ class Distro(object):
|
||||||
|
try:
|
||||||
|
kernelpath = self._getTreeinfoMedia("kernel")
|
||||||
|
initrdpath = self._getTreeinfoMedia("initrd")
|
||||||
|
- except ConfigParser.NoSectionError:
|
||||||
|
+ except configparser.NoSectionError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
if not kernelpath or not initrdpath:
|
||||||
|
@@ -754,15 +758,15 @@ class GenericDistro(Distro):
|
||||||
|
self._valid_kernel_path = (
|
||||||
|
self._getTreeinfoMedia("kernel"),
|
||||||
|
self._getTreeinfoMedia("initrd"))
|
||||||
|
- except (ConfigParser.NoSectionError,
|
||||||
|
- ConfigParser.NoOptionError) as e:
|
||||||
|
+ except (configparser.NoSectionError,
|
||||||
|
+ configparser.NoOptionError) as e:
|
||||||
|
logging.debug(e)
|
||||||
|
|
||||||
|
if self.treeinfo.has_section(isoSection):
|
||||||
|
try:
|
||||||
|
self._valid_iso_path = self.treeinfo.get(isoSection,
|
||||||
|
"boot.iso")
|
||||||
|
- except ConfigParser.NoOptionError as e:
|
||||||
|
+ except configparser.NoOptionError as e:
|
||||||
|
logging.debug(e)
|
||||||
|
|
||||||
|
if self.type == "xen":
|
||||||
|
@@ -1437,7 +1441,7 @@ class ALTLinuxDistro(Distro):
|
||||||
|
# Build list of all *Distro classes
|
||||||
|
def _build_distro_list():
|
||||||
|
allstores = []
|
||||||
|
- for obj in globals().values():
|
||||||
|
+ for obj in list(globals().values()):
|
||||||
|
if isinstance(obj, type) and issubclass(obj, Distro) and obj.name:
|
||||||
|
allstores.append(obj)
|
||||||
|
|
||||||
|
Index: virt-manager-1.4.3/virtinst/diskbackend.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.4.3.orig/virtinst/diskbackend.py
|
||||||
|
+++ virt-manager-1.4.3/virtinst/diskbackend.py
|
||||||
|
@@ -391,7 +391,7 @@ class CloneStorageCreator(_StorageCreato
|
||||||
|
else:
|
||||||
|
vfs = os.statvfs(os.path.dirname(self._path))
|
||||||
|
avail = vfs.f_frsize * vfs.f_bavail
|
||||||
|
- need = long(self._size * 1024 * 1024 * 1024)
|
||||||
|
+ need = int(self._size * 1024 * 1024 * 1024)
|
||||||
|
if need > avail:
|
||||||
|
if self._sparse:
|
||||||
|
msg = _("The filesystem will not have enough free space"
|
||||||
|
@@ -411,7 +411,7 @@ class CloneStorageCreator(_StorageCreato
|
||||||
|
text = (_("Cloning %(srcfile)s") %
|
||||||
|
{'srcfile': os.path.basename(self._input_path)})
|
||||||
|
|
||||||
|
- size_bytes = long(self.get_size() * 1024 * 1024 * 1024)
|
||||||
|
+ size_bytes = int(self.get_size() * 1024 * 1024 * 1024)
|
||||||
|
progresscb.start(filename=self._output_path, size=size_bytes,
|
||||||
|
text=text)
|
||||||
|
|
||||||
|
Index: virt-manager-1.4.3/virtinst/progress.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.4.3.orig/virtinst/progress.py
|
||||||
|
+++ virt-manager-1.4.3/virtinst/progress.py
|
||||||
|
@@ -481,7 +481,7 @@ def format_number(number, SI=0, space='
|
||||||
|
depth = depth + 1
|
||||||
|
number = number / step
|
||||||
|
|
||||||
|
- if isinstance(number, int) or isinstance(number, long):
|
||||||
|
+ if isinstance(number, int) or isinstance(number, int):
|
||||||
|
# it's an int or a long, which means it didn't get divided,
|
||||||
|
# which means it's already short enough
|
||||||
|
fmt = '%i%s%s'
|
||||||
|
Index: virt-manager-1.4.3/virtinst/pollhelpers.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.4.3.orig/virtinst/pollhelpers.py
|
||||||
|
+++ virt-manager-1.4.3/virtinst/pollhelpers.py
|
||||||
|
@@ -50,7 +50,7 @@ def _new_poll_helper(origmap, typename,
|
||||||
|
current[connkey] = origmap[connkey]
|
||||||
|
del(origmap[connkey])
|
||||||
|
|
||||||
|
- return (origmap.values(), new.values(), current.values())
|
||||||
|
+ return (list(origmap.values()), list(new.values()), list(current.values()))
|
||||||
|
|
||||||
|
|
||||||
|
def _old_poll_helper(origmap, typename,
|
||||||
|
@@ -108,7 +108,7 @@ def _old_poll_helper(origmap, typename,
|
||||||
|
except Exception:
|
||||||
|
logging.exception("Couldn't fetch %s '%s'", typename, name)
|
||||||
|
|
||||||
|
- return (origmap.values(), new.values(), current.values())
|
||||||
|
+ return (list(origmap.values()), list(new.values()), list(current.values()))
|
||||||
|
|
||||||
|
|
||||||
|
def fetch_nets(backend, origmap, build_func):
|
||||||
|
@@ -143,7 +143,7 @@ def fetch_pools(backend, origmap, build_
|
||||||
|
for obj in objs:
|
||||||
|
try:
|
||||||
|
obj.refresh(0)
|
||||||
|
- except Exception, e:
|
||||||
|
+ except Exception as e:
|
||||||
|
pass
|
||||||
|
|
||||||
|
return _new_poll_helper(origmap, name,
|
||||||
|
@@ -222,7 +222,7 @@ def _old_fetch_vms(backend, origmap, bui
|
||||||
|
new = {}
|
||||||
|
|
||||||
|
# Build list of previous vms with proper id/name mappings
|
||||||
|
- for vm in origmap.values():
|
||||||
|
+ for vm in list(origmap.values()):
|
||||||
|
if vm.is_active():
|
||||||
|
oldActiveIDs[vm.get_id()] = vm
|
||||||
|
else:
|
||||||
|
@@ -285,7 +285,7 @@ def _old_fetch_vms(backend, origmap, bui
|
||||||
|
except Exception:
|
||||||
|
logging.exception("Couldn't fetch domain '%s'", name)
|
||||||
|
|
||||||
|
- return (origmap.values(), new.values(), current.values())
|
||||||
|
+ return (list(origmap.values()), list(new.values()), list(current.values()))
|
||||||
|
|
||||||
|
|
||||||
|
def fetch_vms(backend, origmap, build_func):
|
809
virtman-python2-to-python3-conversion.patch
Normal file
809
virtman-python2-to-python3-conversion.patch
Normal file
@ -0,0 +1,809 @@
|
|||||||
|
Index: virt-manager-1.4.3/virt-manager
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.4.3.orig/virt-manager
|
||||||
|
+++ virt-manager-1.4.3/virt-manager
|
||||||
|
@@ -1,4 +1,4 @@
|
||||||
|
-#!/usr/bin/env python2
|
||||||
|
+#!/usr/bin/python3
|
||||||
|
#
|
||||||
|
# Copyright (C) 2006, 2014 Red Hat, Inc.
|
||||||
|
# Copyright (C) 2006 Daniel P. Berrange <berrange@redhat.com>
|
||||||
|
@@ -81,7 +81,7 @@ def _import_gtk(leftovers):
|
||||||
|
print("gtk3 3.14.0 or later is required.")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
- if os.environ.has_key('DISPLAY') and os.environ['DISPLAY']:
|
||||||
|
+ if 'DISPLAY' in os.environ and os.environ['DISPLAY']:
|
||||||
|
# This will error if Gtk wasn't correctly initialized
|
||||||
|
Gtk.Window()
|
||||||
|
else:
|
||||||
|
Index: virt-manager-1.4.3/virtManager/network.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.4.3.orig/virtManager/network.py
|
||||||
|
+++ virt-manager-1.4.3/virtManager/network.py
|
||||||
|
@@ -103,7 +103,7 @@ class vmmNetwork(vmmLibvirtObject):
|
||||||
|
def set_qos(self, **kwargs):
|
||||||
|
xmlobj = self._make_xmlobj_to_define()
|
||||||
|
q = xmlobj.bandwidth
|
||||||
|
- for key, val in kwargs.items():
|
||||||
|
+ for key, val in list(kwargs.items()):
|
||||||
|
setattr(q, key, val)
|
||||||
|
|
||||||
|
self._redefine_xmlobj(xmlobj)
|
||||||
|
Index: virt-manager-1.4.3/virtManager/inspection.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.4.3.orig/virtManager/inspection.py
|
||||||
|
+++ virt-manager-1.4.3/virtManager/inspection.py
|
||||||
|
@@ -17,7 +17,7 @@
|
||||||
|
# MA 02110-1301 USA.
|
||||||
|
#
|
||||||
|
|
||||||
|
-from Queue import Queue
|
||||||
|
+from queue import Queue
|
||||||
|
from threading import Thread
|
||||||
|
import logging
|
||||||
|
|
||||||
|
Index: virt-manager-1.4.3/virtManager/systray.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.4.3.orig/virtManager/systray.py
|
||||||
|
+++ virt-manager-1.4.3/virtManager/systray.py
|
||||||
|
@@ -199,13 +199,13 @@ class vmmSystray(vmmGObject):
|
||||||
|
|
||||||
|
def repopulate_menu_list(self):
|
||||||
|
# Build sorted connection list
|
||||||
|
- connsort = self.conn_menuitems.keys()
|
||||||
|
+ connsort = list(self.conn_menuitems.keys())
|
||||||
|
connsort.sort()
|
||||||
|
connsort.reverse()
|
||||||
|
|
||||||
|
# Empty conn list
|
||||||
|
for child in self.systray_menu.get_children():
|
||||||
|
- if child in self.conn_menuitems.values():
|
||||||
|
+ if child in list(self.conn_menuitems.values()):
|
||||||
|
self.systray_menu.remove(child)
|
||||||
|
|
||||||
|
# Build sorted conn list
|
||||||
|
@@ -265,7 +265,7 @@ class vmmSystray(vmmGObject):
|
||||||
|
for vm in conn.list_vms():
|
||||||
|
vm_mappings[vm.get_name()] = vm.get_connkey()
|
||||||
|
|
||||||
|
- vm_names = vm_mappings.keys()
|
||||||
|
+ vm_names = list(vm_mappings.keys())
|
||||||
|
vm_names.sort()
|
||||||
|
|
||||||
|
if len(vm_names) == 0:
|
||||||
|
Index: virt-manager-1.4.3/virtManager/console.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.4.3.orig/virtManager/console.py
|
||||||
|
+++ virt-manager-1.4.3/virtManager/console.py
|
||||||
|
@@ -35,7 +35,7 @@ from .viewers import SpiceViewer, VNCVie
|
||||||
|
(_CONSOLE_PAGE_UNAVAILABLE,
|
||||||
|
_CONSOLE_PAGE_AUTHENTICATE,
|
||||||
|
_CONSOLE_PAGE_SERIAL,
|
||||||
|
- _CONSOLE_PAGE_VIEWER) = range(4)
|
||||||
|
+ _CONSOLE_PAGE_VIEWER) = list(range(4))
|
||||||
|
|
||||||
|
|
||||||
|
class _TimedRevealer(vmmGObject):
|
||||||
|
Index: virt-manager-1.4.3/virtManager/connection.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.4.3.orig/virtManager/connection.py
|
||||||
|
+++ virt-manager-1.4.3/virtManager/connection.py
|
||||||
|
@@ -198,7 +198,7 @@ class vmmConnection(vmmGObject):
|
||||||
|
|
||||||
|
(_STATE_DISCONNECTED,
|
||||||
|
_STATE_CONNECTING,
|
||||||
|
- _STATE_ACTIVE) = range(1, 4)
|
||||||
|
+ _STATE_ACTIVE) = list(range(1, 4))
|
||||||
|
|
||||||
|
def __init__(self, uri):
|
||||||
|
vmmGObject.__init__(self)
|
||||||
|
@@ -1213,35 +1213,35 @@ class vmmConnection(vmmGObject):
|
||||||
|
def _update_nets(self, dopoll):
|
||||||
|
keymap = dict((o.get_connkey(), o) for o in self.list_nets())
|
||||||
|
if not dopoll or not self.is_network_capable():
|
||||||
|
- return [], [], keymap.values()
|
||||||
|
+ return [], [], list(keymap.values())
|
||||||
|
return pollhelpers.fetch_nets(self._backend, keymap,
|
||||||
|
(lambda obj, key: vmmNetwork(self, obj, key)))
|
||||||
|
|
||||||
|
def _update_pools(self, dopoll):
|
||||||
|
keymap = dict((o.get_connkey(), o) for o in self.list_pools())
|
||||||
|
if not dopoll or not self.is_storage_capable():
|
||||||
|
- return [], [], keymap.values()
|
||||||
|
+ return [], [], list(keymap.values())
|
||||||
|
return pollhelpers.fetch_pools(self._backend, keymap,
|
||||||
|
(lambda obj, key: vmmStoragePool(self, obj, key)))
|
||||||
|
|
||||||
|
def _update_interfaces(self, dopoll):
|
||||||
|
keymap = dict((o.get_connkey(), o) for o in self.list_interfaces())
|
||||||
|
if not dopoll or not self.is_interface_capable():
|
||||||
|
- return [], [], keymap.values()
|
||||||
|
+ return [], [], list(keymap.values())
|
||||||
|
return pollhelpers.fetch_interfaces(self._backend, keymap,
|
||||||
|
(lambda obj, key: vmmInterface(self, obj, key)))
|
||||||
|
|
||||||
|
def _update_nodedevs(self, dopoll):
|
||||||
|
keymap = dict((o.get_connkey(), o) for o in self.list_nodedevs())
|
||||||
|
if not dopoll or not self.is_nodedev_capable():
|
||||||
|
- return [], [], keymap.values()
|
||||||
|
+ return [], [], list(keymap.values())
|
||||||
|
return pollhelpers.fetch_nodedevs(self._backend, keymap,
|
||||||
|
(lambda obj, key: vmmNodeDevice(self, obj, key)))
|
||||||
|
|
||||||
|
def _update_vms(self, dopoll):
|
||||||
|
keymap = dict((o.get_connkey(), o) for o in self.list_vms())
|
||||||
|
if not dopoll:
|
||||||
|
- return [], [], keymap.values()
|
||||||
|
+ return [], [], list(keymap.values())
|
||||||
|
return pollhelpers.fetch_vms(self._backend, keymap,
|
||||||
|
(lambda obj, key: vmmDomain(self, obj, key)))
|
||||||
|
|
||||||
|
Index: virt-manager-1.4.3/virtManager/addhardware.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.4.3.orig/virtManager/addhardware.py
|
||||||
|
+++ virt-manager-1.4.3/virtManager/addhardware.py
|
||||||
|
@@ -57,7 +57,7 @@ from .addstorage import vmmAddStorage
|
||||||
|
PAGE_USBREDIR,
|
||||||
|
PAGE_TPM,
|
||||||
|
PAGE_RNG,
|
||||||
|
- PAGE_PANIC) = range(0, 17)
|
||||||
|
+ PAGE_PANIC) = list(range(0, 17))
|
||||||
|
|
||||||
|
|
||||||
|
class vmmAddHardware(vmmGObjectUI):
|
||||||
|
@@ -1160,7 +1160,7 @@ class vmmAddHardware(vmmGObjectUI):
|
||||||
|
self._dev = VirtualTPMDevice(self.conn.get_backend())
|
||||||
|
self._dev.type = devtype
|
||||||
|
|
||||||
|
- for param_name, widget_name in tpm_widget_mappings.items():
|
||||||
|
+ for param_name, widget_name in list(tpm_widget_mappings.items()):
|
||||||
|
make_visible = self._dev.supports_property(param_name)
|
||||||
|
uiutil.set_grid_row_visible(self.widget(widget_name + "-label"),
|
||||||
|
make_visible)
|
||||||
|
@@ -1214,7 +1214,7 @@ class vmmAddHardware(vmmGObjectUI):
|
||||||
|
self._dev = char_class(self.conn.get_backend())
|
||||||
|
self._dev.type = devtype
|
||||||
|
|
||||||
|
- for param_name, widget_name in char_widget_mappings.items():
|
||||||
|
+ for param_name, widget_name in list(char_widget_mappings.items()):
|
||||||
|
make_visible = self._dev.supports_property(param_name)
|
||||||
|
uiutil.set_grid_row_visible(self.widget(widget_name + "-label"),
|
||||||
|
make_visible)
|
||||||
|
@@ -1669,7 +1669,7 @@ class vmmAddHardware(vmmGObjectUI):
|
||||||
|
try:
|
||||||
|
self._dev = devclass
|
||||||
|
|
||||||
|
- for param_name, val in value_mappings.items():
|
||||||
|
+ for param_name, val in list(value_mappings.items()):
|
||||||
|
if self._dev.supports_property(param_name) and val is not None:
|
||||||
|
setattr(self._dev, param_name, val)
|
||||||
|
|
||||||
|
@@ -1750,7 +1750,7 @@ class vmmAddHardware(vmmGObjectUI):
|
||||||
|
try:
|
||||||
|
self._dev = VirtualTPMDevice(conn)
|
||||||
|
self._dev.type = typ
|
||||||
|
- for param_name, val in value_mappings.items():
|
||||||
|
+ for param_name, val in list(value_mappings.items()):
|
||||||
|
if self._dev.supports_property(param_name):
|
||||||
|
setattr(self._dev, param_name, val)
|
||||||
|
except Exception as e:
|
||||||
|
@@ -1854,7 +1854,7 @@ class vmmAddHardware(vmmGObjectUI):
|
||||||
|
try:
|
||||||
|
self._dev = virtinst.VirtualRNGDevice(self.conn.get_backend())
|
||||||
|
self._dev.type = rtype
|
||||||
|
- for param_name, val in value_mappings.items():
|
||||||
|
+ for param_name, val in list(value_mappings.items()):
|
||||||
|
if self._dev.supports_property(param_name):
|
||||||
|
setattr(self._dev, param_name, val)
|
||||||
|
except Exception as e:
|
||||||
|
Index: virt-manager-1.4.3/virtManager/createinterface.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.4.3.orig/virtManager/createinterface.py
|
||||||
|
+++ virt-manager-1.4.3/virtManager/createinterface.py
|
||||||
|
@@ -387,7 +387,7 @@ class vmmCreateInterface(vmmGObjectUI):
|
||||||
|
Interface.INTERFACE_TYPE_VLAN: "vlan",
|
||||||
|
}
|
||||||
|
|
||||||
|
- for key, value in type_dict.items():
|
||||||
|
+ for key, value in list(type_dict.items()):
|
||||||
|
do_show = (key == itype)
|
||||||
|
self.widget("%s-label" % value).set_visible(do_show)
|
||||||
|
self.widget("%s-box" % value).set_visible(do_show)
|
||||||
|
@@ -544,7 +544,7 @@ class vmmCreateInterface(vmmGObjectUI):
|
||||||
|
active, None, iface.get_mac()]
|
||||||
|
row_dict[name] = row
|
||||||
|
|
||||||
|
- for name, row in nodedevs.items():
|
||||||
|
+ for name, row in list(nodedevs.items()):
|
||||||
|
try:
|
||||||
|
key = Interface(self.conn.get_backend())
|
||||||
|
key.type = Interface.INTERFACE_TYPE_ETHERNET
|
||||||
|
@@ -556,12 +556,12 @@ class vmmCreateInterface(vmmGObjectUI):
|
||||||
|
row[INTERFACE_ROW_KEY] = key
|
||||||
|
row_dict[name] = row
|
||||||
|
|
||||||
|
- for row in row_dict.values():
|
||||||
|
+ for row in list(row_dict.values()):
|
||||||
|
name = row[INTERFACE_ROW_NAME]
|
||||||
|
row[INTERFACE_ROW_IN_USE_BY] = self.iface_in_use_by(self.conn,
|
||||||
|
name)
|
||||||
|
|
||||||
|
- for row in row_dict.values():
|
||||||
|
+ for row in list(row_dict.values()):
|
||||||
|
model.append(row)
|
||||||
|
|
||||||
|
def get_default_name(self):
|
||||||
|
Index: virt-manager-1.4.3/virtManager/snapshots.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.4.3.orig/virtManager/snapshots.py
|
||||||
|
+++ virt-manager-1.4.3/virtManager/snapshots.py
|
||||||
|
@@ -44,7 +44,7 @@ mimemap = {
|
||||||
|
|
||||||
|
|
||||||
|
def _mime_to_ext(val, reverse=False):
|
||||||
|
- for m, e in mimemap.items():
|
||||||
|
+ for m, e in list(mimemap.items()):
|
||||||
|
if val == m and not reverse:
|
||||||
|
return e
|
||||||
|
if val == e and reverse:
|
||||||
|
@@ -507,7 +507,7 @@ class vmmSnapshotPage(vmmGObjectUI):
|
||||||
|
basesn = os.path.join(cachedir, "snap-screenshot-%s" % name)
|
||||||
|
|
||||||
|
# Remove any pre-existing screenshots so we don't show stale data
|
||||||
|
- for ext in mimemap.values():
|
||||||
|
+ for ext in list(mimemap.values()):
|
||||||
|
p = basesn + "." + ext
|
||||||
|
if os.path.exists(basesn + "." + ext):
|
||||||
|
os.unlink(p)
|
||||||
|
Index: virt-manager-1.4.3/virtManager/graphwidgets.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.4.3.orig/virtManager/graphwidgets.py
|
||||||
|
+++ virt-manager-1.4.3/virtManager/graphwidgets.py
|
||||||
|
@@ -25,8 +25,8 @@ from gi.repository import Gtk
|
||||||
|
|
||||||
|
def rect_print(name, rect):
|
||||||
|
# For debugging
|
||||||
|
- print("%s: height=%d, width=%d, x=%d, y=%d" %
|
||||||
|
- (name, rect.height, rect.width, rect.x, rect.y))
|
||||||
|
+ print(("%s: height=%d, width=%d, x=%d, y=%d" %
|
||||||
|
+ (name, rect.height, rect.width, rect.x, rect.y)))
|
||||||
|
|
||||||
|
|
||||||
|
def _line_helper(cairo_ct, x, y, w, h, points, for_fill=False):
|
||||||
|
@@ -316,7 +316,7 @@ class Sparkline(Gtk.DrawingArea):
|
||||||
|
w = window.get_width()
|
||||||
|
h = window.get_height()
|
||||||
|
|
||||||
|
- points_per_set = (len(self.data_array) / self.num_sets)
|
||||||
|
+ points_per_set = (len(self.data_array) // self.num_sets)
|
||||||
|
pixels_per_point = (float(w) /
|
||||||
|
(float((points_per_set - 1) or 1)))
|
||||||
|
|
||||||
|
Index: virt-manager-1.4.3/virtManager/host.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.4.3.orig/virtManager/host.py
|
||||||
|
+++ virt-manager-1.4.3/virtManager/host.py
|
||||||
|
@@ -43,11 +43,11 @@ EDIT_NET_IDS = (
|
||||||
|
EDIT_NET_NAME,
|
||||||
|
EDIT_NET_AUTOSTART,
|
||||||
|
EDIT_NET_QOS,
|
||||||
|
-) = range(3)
|
||||||
|
+) = list(range(3))
|
||||||
|
|
||||||
|
EDIT_INTERFACE_IDS = (
|
||||||
|
EDIT_INTERFACE_STARTMODE,
|
||||||
|
-) = range(200, 201)
|
||||||
|
+) = list(range(200, 201))
|
||||||
|
|
||||||
|
|
||||||
|
class vmmHost(vmmGObjectUI):
|
||||||
|
Index: virt-manager-1.4.3/virtManager/sshtunnels.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.4.3.orig/virtManager/sshtunnels.py
|
||||||
|
+++ virt-manager-1.4.3/virtManager/sshtunnels.py
|
||||||
|
@@ -20,7 +20,7 @@
|
||||||
|
import functools
|
||||||
|
import logging
|
||||||
|
import os
|
||||||
|
-import Queue
|
||||||
|
+import queue
|
||||||
|
import socket
|
||||||
|
import signal
|
||||||
|
import threading
|
||||||
|
@@ -125,7 +125,7 @@ class _TunnelScheduler(object):
|
||||||
|
"""
|
||||||
|
def __init__(self):
|
||||||
|
self._thread = None
|
||||||
|
- self._queue = Queue.Queue()
|
||||||
|
+ self._queue = queue.Queue()
|
||||||
|
self._lock = threading.Lock()
|
||||||
|
|
||||||
|
def _handle_queue(self):
|
||||||
|
Index: virt-manager-1.4.3/virtManager/engine.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.4.3.orig/virtManager/engine.py
|
||||||
|
+++ virt-manager-1.4.3/virtManager/engine.py
|
||||||
|
@@ -20,7 +20,7 @@
|
||||||
|
|
||||||
|
import logging
|
||||||
|
import re
|
||||||
|
-import Queue
|
||||||
|
+import queue
|
||||||
|
import threading
|
||||||
|
import traceback
|
||||||
|
|
||||||
|
@@ -60,7 +60,7 @@ DETAILS_CONFIG = 2
|
||||||
|
DETAILS_CONSOLE = 3
|
||||||
|
|
||||||
|
(PRIO_HIGH,
|
||||||
|
- PRIO_LOW) = range(1, 3)
|
||||||
|
+ PRIO_LOW) = list(range(1, 3))
|
||||||
|
|
||||||
|
|
||||||
|
class vmmEngine(vmmGObject):
|
||||||
|
@@ -104,7 +104,7 @@ class vmmEngine(vmmGObject):
|
||||||
|
target=self._handle_tick_queue,
|
||||||
|
args=())
|
||||||
|
self._tick_thread.daemon = True
|
||||||
|
- self._tick_queue = Queue.PriorityQueue(100)
|
||||||
|
+ self._tick_queue = queue.PriorityQueue(100)
|
||||||
|
|
||||||
|
self.inspection = None
|
||||||
|
self._create_inspection_thread()
|
||||||
|
@@ -153,7 +153,7 @@ class vmmEngine(vmmGObject):
|
||||||
|
self._application.add_action(action)
|
||||||
|
|
||||||
|
def _default_startup(self, skip_autostart):
|
||||||
|
- uris = self.conns.keys()
|
||||||
|
+ uris = list(self.conns.keys())
|
||||||
|
if not uris:
|
||||||
|
logging.debug("No stored URIs found.")
|
||||||
|
else:
|
||||||
|
@@ -279,15 +279,15 @@ class vmmEngine(vmmGObject):
|
||||||
|
"""
|
||||||
|
We serialize conn autostart, so polkit/ssh-askpass doesn't spam
|
||||||
|
"""
|
||||||
|
- queue = Queue.Queue()
|
||||||
|
+ local_queue = queue.Queue()
|
||||||
|
auto_conns = [uri for uri in self.conns
|
||||||
|
if self.conns[uri]["conn"].get_autoconnect()]
|
||||||
|
|
||||||
|
def add_next_to_queue():
|
||||||
|
if not auto_conns:
|
||||||
|
- queue.put(None)
|
||||||
|
+ local_queue.put(None)
|
||||||
|
else:
|
||||||
|
- queue.put(auto_conns.pop(0))
|
||||||
|
+ local_queue.put(auto_conns.pop(0))
|
||||||
|
|
||||||
|
def state_change_cb(conn):
|
||||||
|
if conn.is_active():
|
||||||
|
@@ -299,7 +299,7 @@ class vmmEngine(vmmGObject):
|
||||||
|
|
||||||
|
def handle_queue():
|
||||||
|
while True:
|
||||||
|
- uri = queue.get()
|
||||||
|
+ uri = local_queue.get()
|
||||||
|
if uri is None:
|
||||||
|
return
|
||||||
|
if uri not in self.conns:
|
||||||
|
@@ -336,7 +336,7 @@ class vmmEngine(vmmGObject):
|
||||||
|
|
||||||
|
hvuri = conn.get_uri()
|
||||||
|
|
||||||
|
- for connkey in self.conns[hvuri]["windowDetails"].keys():
|
||||||
|
+ for connkey in list(self.conns[hvuri]["windowDetails"].keys()):
|
||||||
|
self.conns[hvuri]["windowDetails"][connkey].cleanup()
|
||||||
|
del(self.conns[hvuri]["windowDetails"][connkey])
|
||||||
|
|
||||||
|
@@ -521,10 +521,10 @@ class vmmEngine(vmmGObject):
|
||||||
|
focus, and use that
|
||||||
|
"""
|
||||||
|
windowlist = [self.windowManager]
|
||||||
|
- for conndict in self.conns.values():
|
||||||
|
- windowlist.extend(conndict["windowDetails"].values())
|
||||||
|
+ for conndict in list(self.conns.values()):
|
||||||
|
+ windowlist.extend(list(conndict["windowDetails"].values()))
|
||||||
|
windowlist.extend(
|
||||||
|
- [conndict["windowHost"] for conndict in self.conns.values()])
|
||||||
|
+ [conndict["windowHost"] for conndict in list(self.conns.values())])
|
||||||
|
|
||||||
|
use_win = None
|
||||||
|
for window in windowlist:
|
||||||
|
@@ -600,7 +600,7 @@ class vmmEngine(vmmGObject):
|
||||||
|
self.conns[uri]["windowClone"].cleanup()
|
||||||
|
|
||||||
|
details = self.conns[uri]["windowDetails"]
|
||||||
|
- for win in details.values():
|
||||||
|
+ for win in list(details.values()):
|
||||||
|
win.cleanup()
|
||||||
|
|
||||||
|
self.conns[uri]["conn"].cleanup()
|
||||||
|
@@ -620,7 +620,7 @@ class vmmEngine(vmmGObject):
|
||||||
|
handle_id = vmmGObject.connect(self, name, callback, *args)
|
||||||
|
|
||||||
|
if name == "conn-added":
|
||||||
|
- for conn_dict in self.conns.values():
|
||||||
|
+ for conn_dict in list(self.conns.values()):
|
||||||
|
self.emit("conn-added", conn_dict["conn"])
|
||||||
|
|
||||||
|
return handle_id
|
||||||
|
@@ -770,7 +770,7 @@ class vmmEngine(vmmGObject):
|
||||||
|
return self.connect_to_uri(uri, autoconnect, probe=True)
|
||||||
|
|
||||||
|
def cancelled(src):
|
||||||
|
- if len(self.conns.keys()) == 0:
|
||||||
|
+ if len(list(self.conns.keys())) == 0:
|
||||||
|
self.exit_app(src)
|
||||||
|
|
||||||
|
obj = vmmConnect()
|
||||||
|
Index: virt-manager-1.4.3/virtManager/mediacombo.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.4.3.orig/virtManager/mediacombo.py
|
||||||
|
+++ virt-manager-1.4.3/virtManager/mediacombo.py
|
||||||
|
@@ -33,7 +33,7 @@ class vmmMediaCombo(vmmGObjectUI):
|
||||||
|
(OPTICAL_DEV_PATH,
|
||||||
|
OPTICAL_LABEL,
|
||||||
|
OPTICAL_HAS_MEDIA,
|
||||||
|
- OPTICAL_DEV_KEY) = range(OPTICAL_FIELDS)
|
||||||
|
+ OPTICAL_DEV_KEY) = list(range(OPTICAL_FIELDS))
|
||||||
|
|
||||||
|
def __init__(self, conn, builder, topwin, media_type):
|
||||||
|
vmmGObjectUI.__init__(self, None, None, builder=builder, topwin=topwin)
|
||||||
|
Index: virt-manager-1.4.3/virtManager/clone.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.4.3.orig/virtManager/clone.py
|
||||||
|
+++ virt-manager-1.4.3/virtManager/clone.py
|
||||||
|
@@ -336,7 +336,7 @@ class vmmCloneVM(vmmGObjectUI):
|
||||||
|
|
||||||
|
build_net_row(label, mac, newmac)
|
||||||
|
|
||||||
|
- no_net = bool(len(self.net_list.keys()) == 0)
|
||||||
|
+ no_net = bool(len(list(self.net_list.keys())) == 0)
|
||||||
|
self.widget("clone-network-box").set_visible(not no_net)
|
||||||
|
self.widget("clone-no-net").set_visible(no_net)
|
||||||
|
|
||||||
|
@@ -460,7 +460,7 @@ class vmmCloneVM(vmmGObjectUI):
|
||||||
|
if cd.clone_name == newname:
|
||||||
|
return
|
||||||
|
|
||||||
|
- for row in self.storage_list.values():
|
||||||
|
+ for row in list(self.storage_list.values()):
|
||||||
|
origpath = row[STORAGE_INFO_ORIG_PATH]
|
||||||
|
if row[STORAGE_INFO_MANUAL_PATH]:
|
||||||
|
continue
|
||||||
|
@@ -599,7 +599,7 @@ class vmmCloneVM(vmmGObjectUI):
|
||||||
|
# If any storage cannot be cloned or shared, don't allow cloning
|
||||||
|
clone = True
|
||||||
|
tooltip = ""
|
||||||
|
- for row in self.storage_list.values():
|
||||||
|
+ for row in list(self.storage_list.values()):
|
||||||
|
can_clone = row[STORAGE_INFO_CAN_CLONE]
|
||||||
|
can_share = row[STORAGE_INFO_CAN_SHARE]
|
||||||
|
if not (can_clone or can_share):
|
||||||
|
Index: virt-manager-1.4.3/virtManager/netlist.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.4.3.orig/virtManager/netlist.py
|
||||||
|
+++ virt-manager-1.4.3/virtManager/netlist.py
|
||||||
|
@@ -197,7 +197,7 @@ class vmmNetworkList(vmmGObjectUI):
|
||||||
|
for slave in slave_names:
|
||||||
|
netdevs.pop(slave, None)
|
||||||
|
|
||||||
|
- for name, is_bridge, slave_names in netdevs.values():
|
||||||
|
+ for name, is_bridge, slave_names in list(netdevs.values()):
|
||||||
|
if ((name in vnet_taps) or
|
||||||
|
(name in [v + "-nic" for v in vnet_bridges]) or
|
||||||
|
(name in skip_ifaces)):
|
||||||
|
Index: virt-manager-1.4.3/virtManager/manager.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.4.3.orig/virtManager/manager.py
|
||||||
|
+++ virt-manager-1.4.3/virtManager/manager.py
|
||||||
|
@@ -48,7 +48,7 @@ ROW_IS_CONN_CONNECTED,
|
||||||
|
ROW_IS_VM,
|
||||||
|
ROW_IS_VM_RUNNING,
|
||||||
|
ROW_COLOR,
|
||||||
|
-ROW_INSPECTION_OS_ICON) = range(11)
|
||||||
|
+ROW_INSPECTION_OS_ICON) = list(range(11))
|
||||||
|
|
||||||
|
# Columns in the tree view
|
||||||
|
(COL_NAME,
|
||||||
|
@@ -56,7 +56,7 @@ COL_GUEST_CPU,
|
||||||
|
COL_HOST_CPU,
|
||||||
|
COL_MEM,
|
||||||
|
COL_DISK,
|
||||||
|
-COL_NETWORK) = range(6)
|
||||||
|
+COL_NETWORK) = list(range(6))
|
||||||
|
|
||||||
|
|
||||||
|
def _style_get_prop(widget, propname):
|
||||||
|
Index: virt-manager-1.4.3/virtManager/keyring.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.4.3.orig/virtManager/keyring.py
|
||||||
|
+++ virt-manager-1.4.3/virtManager/keyring.py
|
||||||
|
@@ -110,10 +110,10 @@ class vmmKeyring(object):
|
||||||
|
label = iface.get_cached_property("Label").unpack().strip("'")
|
||||||
|
dbusattrs = iface.get_cached_property("Attributes").unpack()
|
||||||
|
|
||||||
|
- secret = u"".join([unichr(c) for c in secretbytes])
|
||||||
|
+ secret = "".join([chr(c) for c in secretbytes])
|
||||||
|
|
||||||
|
attrs = {}
|
||||||
|
- for key, val in dbusattrs.items():
|
||||||
|
+ for key, val in list(dbusattrs.items()):
|
||||||
|
if key not in ["hvuri", "uuid"]:
|
||||||
|
continue
|
||||||
|
attrs["%s" % key] = "%s" % val
|
||||||
|
Index: virt-manager-1.4.3/virtManager/addstorage.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.4.3.orig/virtManager/addstorage.py
|
||||||
|
+++ virt-manager-1.4.3/virtManager/addstorage.py
|
||||||
|
@@ -162,7 +162,7 @@ class vmmAddStorage(vmmGObjectUI):
|
||||||
|
errmsg = _("Errors were encountered changing permissions for the "
|
||||||
|
"following directories:")
|
||||||
|
details = ""
|
||||||
|
- for p, error in errors.items():
|
||||||
|
+ for p, error in list(errors.items()):
|
||||||
|
if p not in broken_paths:
|
||||||
|
continue
|
||||||
|
details += "%s : %s\n" % (p, error)
|
||||||
|
@@ -174,7 +174,7 @@ class vmmAddStorage(vmmGObjectUI):
|
||||||
|
_("Don't ask about these directories again."))
|
||||||
|
|
||||||
|
if chkres:
|
||||||
|
- src.config.add_perms_fix_ignore(errors.keys())
|
||||||
|
+ src.config.add_perms_fix_ignore(list(errors.keys()))
|
||||||
|
|
||||||
|
def reset_state(self):
|
||||||
|
self._update_host_space()
|
||||||
|
Index: virt-manager-1.4.3/virtManager/details.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.4.3.orig/virtManager/details.py
|
||||||
|
+++ virt-manager-1.4.3/virtManager/details.py
|
||||||
|
@@ -106,7 +106,7 @@ from .graphwidgets import Sparkline
|
||||||
|
|
||||||
|
EDIT_FS,
|
||||||
|
|
||||||
|
- EDIT_HOSTDEV_ROMBAR) = range(1, 49)
|
||||||
|
+ EDIT_HOSTDEV_ROMBAR) = list(range(1, 49))
|
||||||
|
|
||||||
|
|
||||||
|
# Columns in hw list model
|
||||||
|
@@ -114,7 +114,7 @@ from .graphwidgets import Sparkline
|
||||||
|
HW_LIST_COL_ICON_NAME,
|
||||||
|
HW_LIST_COL_ICON_SIZE,
|
||||||
|
HW_LIST_COL_TYPE,
|
||||||
|
- HW_LIST_COL_DEVICE) = range(5)
|
||||||
|
+ HW_LIST_COL_DEVICE) = list(range(5))
|
||||||
|
|
||||||
|
# Types for the hw list model: numbers specify what order they will be listed
|
||||||
|
(HW_LIST_TYPE_GENERAL,
|
||||||
|
@@ -138,7 +138,7 @@ from .graphwidgets import Sparkline
|
||||||
|
HW_LIST_TYPE_REDIRDEV,
|
||||||
|
HW_LIST_TYPE_TPM,
|
||||||
|
HW_LIST_TYPE_RNG,
|
||||||
|
- HW_LIST_TYPE_PANIC) = range(22)
|
||||||
|
+ HW_LIST_TYPE_PANIC) = list(range(22))
|
||||||
|
|
||||||
|
remove_pages = [HW_LIST_TYPE_NIC, HW_LIST_TYPE_INPUT,
|
||||||
|
HW_LIST_TYPE_GRAPHICS, HW_LIST_TYPE_SOUND, HW_LIST_TYPE_CHAR,
|
||||||
|
@@ -153,12 +153,12 @@ remove_pages = [HW_LIST_TYPE_NIC, HW_LIS
|
||||||
|
BOOT_LABEL,
|
||||||
|
BOOT_ICON,
|
||||||
|
BOOT_ACTIVE,
|
||||||
|
- BOOT_CAN_SELECT) = range(5)
|
||||||
|
+ BOOT_CAN_SELECT) = list(range(5))
|
||||||
|
|
||||||
|
# Main tab pages
|
||||||
|
(DETAILS_PAGE_DETAILS,
|
||||||
|
DETAILS_PAGE_CONSOLE,
|
||||||
|
- DETAILS_PAGE_SNAPSHOTS) = range(3)
|
||||||
|
+ DETAILS_PAGE_SNAPSHOTS) = list(range(3))
|
||||||
|
|
||||||
|
_remove_tooltip = _("Remove this device from the virtual machine")
|
||||||
|
|
||||||
|
@@ -744,7 +744,7 @@ class vmmDetails(vmmGObjectUI):
|
||||||
|
rmHW.connect("activate", self.remove_xml_dev)
|
||||||
|
|
||||||
|
self._addhwmenuitems = {"add": addHW, "remove": rmHW}
|
||||||
|
- for i in self._addhwmenuitems.values():
|
||||||
|
+ for i in list(self._addhwmenuitems.values()):
|
||||||
|
self.addhwmenu.add(i)
|
||||||
|
|
||||||
|
self.widget("hw-panel").set_show_tabs(False)
|
||||||
|
@@ -1519,7 +1519,7 @@ class vmmDetails(vmmGObjectUI):
|
||||||
|
'tEXt::Generator Version': self.config.get_appversion(),
|
||||||
|
}
|
||||||
|
|
||||||
|
- ret = image.save_to_bufferv('png', metadata.keys(), metadata.values())
|
||||||
|
+ ret = image.save_to_bufferv('png', list(metadata.keys()), list(metadata.values()))
|
||||||
|
# On Fedora 19, ret is (bool, str)
|
||||||
|
# Someday the bindings might be fixed to just return the str, try
|
||||||
|
# and future proof it a bit
|
||||||
|
@@ -2835,7 +2835,7 @@ class vmmDetails(vmmGObjectUI):
|
||||||
|
set_visible("rng-bind-host", is_egd and (udp or bind))
|
||||||
|
set_visible("rng-bind-service", is_egd and (udp or bind))
|
||||||
|
|
||||||
|
- for k, prop in values.items():
|
||||||
|
+ for k, prop in list(values.items()):
|
||||||
|
val = "-"
|
||||||
|
if dev.supports_property(prop):
|
||||||
|
val = getattr(dev, prop) or "-"
|
||||||
|
@@ -3214,7 +3214,7 @@ class vmmDetails(vmmGObjectUI):
|
||||||
|
for dev in self.vm.get_panic_devices():
|
||||||
|
update_hwlist(HW_LIST_TYPE_PANIC, dev)
|
||||||
|
|
||||||
|
- devs = range(len(hw_list_model))
|
||||||
|
+ devs = list(range(len(hw_list_model)))
|
||||||
|
devs.reverse()
|
||||||
|
for i in devs:
|
||||||
|
_iter = hw_list_model.iter_nth_child(None, i)
|
||||||
|
Index: virt-manager-1.4.3/virtManager/create.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.4.3.orig/virtManager/create.py
|
||||||
|
+++ virt-manager-1.4.3/virtManager/create.py
|
||||||
|
@@ -55,7 +55,7 @@ DEFAULT_MEM = 1024
|
||||||
|
PAGE_INSTALL,
|
||||||
|
PAGE_MEM,
|
||||||
|
PAGE_STORAGE,
|
||||||
|
- PAGE_FINISH) = range(5)
|
||||||
|
+ PAGE_FINISH) = list(range(5))
|
||||||
|
|
||||||
|
(INSTALL_PAGE_ISO,
|
||||||
|
INSTALL_PAGE_URL,
|
||||||
|
@@ -63,13 +63,13 @@ DEFAULT_MEM = 1024
|
||||||
|
INSTALL_PAGE_IMPORT,
|
||||||
|
INSTALL_PAGE_CONTAINER_APP,
|
||||||
|
INSTALL_PAGE_CONTAINER_OS,
|
||||||
|
- INSTALL_PAGE_VZ_TEMPLATE) = range(7)
|
||||||
|
+ INSTALL_PAGE_VZ_TEMPLATE) = list(range(7))
|
||||||
|
|
||||||
|
# Column numbers for os type/version list models
|
||||||
|
(OS_COL_ID,
|
||||||
|
OS_COL_LABEL,
|
||||||
|
OS_COL_IS_SEP,
|
||||||
|
- OS_COL_IS_SHOW_ALL) = range(4)
|
||||||
|
+ OS_COL_IS_SHOW_ALL) = list(range(4))
|
||||||
|
|
||||||
|
|
||||||
|
#####################
|
||||||
|
@@ -951,7 +951,7 @@ class vmmCreate(vmmGObjectUI):
|
||||||
|
model.clear()
|
||||||
|
|
||||||
|
default = -1
|
||||||
|
- for c in self.engine.conns.values():
|
||||||
|
+ for c in list(self.engine.conns.values()):
|
||||||
|
connobj = c["conn"]
|
||||||
|
if not connobj.is_active():
|
||||||
|
continue
|
||||||
|
@@ -2579,7 +2579,7 @@ class vmmCreate(vmmGObjectUI):
|
||||||
|
'passwd': self._get_config_oscontainer_source_password,
|
||||||
|
'insecure': self._get_config_oscontainer_isecure
|
||||||
|
}
|
||||||
|
- for key, getter in bootstrap_arg_keys.items():
|
||||||
|
+ for key, getter in list(bootstrap_arg_keys.items()):
|
||||||
|
bootstrap_args[key] = getter()
|
||||||
|
|
||||||
|
parentobj = self._customize_window or self
|
||||||
|
Index: virt-manager-1.4.3/virtManager/preferences.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.4.3.orig/virtManager/preferences.py
|
||||||
|
+++ virt-manager-1.4.3/virtManager/preferences.py
|
||||||
|
@@ -121,7 +121,7 @@ class vmmPreferences(vmmGObjectUI):
|
||||||
|
}
|
||||||
|
model.append([-1, _("System default (%s)") %
|
||||||
|
vals[self.config.default_console_resizeguest]])
|
||||||
|
- for key, val in vals.items():
|
||||||
|
+ for key, val in list(vals.items()):
|
||||||
|
model.append([key, val])
|
||||||
|
combo.set_model(model)
|
||||||
|
uiutil.init_combo_text_column(combo, 1)
|
||||||
|
Index: virt-manager-1.4.3/virtManager/migrate.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.4.3.orig/virtManager/migrate.py
|
||||||
|
+++ virt-manager-1.4.3/virtManager/migrate.py
|
||||||
|
@@ -36,7 +36,7 @@ from .domain import vmmDomain
|
||||||
|
NUM_COLS = 3
|
||||||
|
(COL_LABEL,
|
||||||
|
COL_URI,
|
||||||
|
- COL_CAN_MIGRATE) = range(NUM_COLS)
|
||||||
|
+ COL_CAN_MIGRATE) = list(range(NUM_COLS))
|
||||||
|
|
||||||
|
|
||||||
|
class vmmMigrateDialog(vmmGObjectUI):
|
||||||
|
@@ -310,7 +310,7 @@ class vmmMigrateDialog(vmmGObjectUI):
|
||||||
|
model.clear()
|
||||||
|
|
||||||
|
rows = []
|
||||||
|
- for conn in self._conns.values():
|
||||||
|
+ for conn in list(self._conns.values()):
|
||||||
|
rows.append(self._build_dest_row(conn))
|
||||||
|
|
||||||
|
if not any([row[COL_CAN_MIGRATE] for row in rows]):
|
||||||
|
Index: virt-manager-1.4.3/virtManager/connect.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.4.3.orig/virtManager/connect.py
|
||||||
|
+++ virt-manager-1.4.3/virtManager/connect.py
|
||||||
|
@@ -22,7 +22,7 @@ import glob
|
||||||
|
import os
|
||||||
|
import logging
|
||||||
|
import socket
|
||||||
|
-import urllib
|
||||||
|
+import urllib.request, urllib.parse, urllib.error
|
||||||
|
|
||||||
|
from gi.repository import Gio
|
||||||
|
from gi.repository import GObject
|
||||||
|
@@ -36,11 +36,11 @@ HV_XEN,
|
||||||
|
HV_LXC,
|
||||||
|
HV_QEMU_SESSION,
|
||||||
|
HV_BHYVE,
|
||||||
|
-HV_VZ) = range(6)
|
||||||
|
+HV_VZ) = list(range(6))
|
||||||
|
|
||||||
|
(CONN_SSH,
|
||||||
|
CONN_TCP,
|
||||||
|
-CONN_TLS) = range(3)
|
||||||
|
+CONN_TLS) = list(range(3))
|
||||||
|
|
||||||
|
|
||||||
|
def current_user():
|
||||||
|
@@ -394,7 +394,7 @@ class vmmConnect(vmmGObjectUI):
|
||||||
|
|
||||||
|
addrstr = ""
|
||||||
|
if user:
|
||||||
|
- addrstr += urllib.quote(user) + "@"
|
||||||
|
+ addrstr += urllib.parse.quote(user) + "@"
|
||||||
|
|
||||||
|
if host.count(":") > 1:
|
||||||
|
host = "[%s]" % host
|
||||||
|
@@ -449,7 +449,7 @@ class vmmConnect(vmmGObjectUI):
|
||||||
|
if host.startswith("linux-"):
|
||||||
|
tmphost = host[6:]
|
||||||
|
try:
|
||||||
|
- long(tmphost)
|
||||||
|
+ int(tmphost)
|
||||||
|
host = ""
|
||||||
|
except ValueError:
|
||||||
|
pass
|
||||||
|
Index: virt-manager-1.4.3/virtManager/storagelist.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.4.3.orig/virtManager/storagelist.py
|
||||||
|
+++ virt-manager-1.4.3/virtManager/storagelist.py
|
||||||
|
@@ -36,7 +36,7 @@ from .createvol import vmmCreateVolume
|
||||||
|
EDIT_POOL_IDS = (
|
||||||
|
EDIT_POOL_NAME,
|
||||||
|
EDIT_POOL_AUTOSTART,
|
||||||
|
-) = range(2)
|
||||||
|
+) = list(range(2))
|
||||||
|
|
||||||
|
VOL_NUM_COLUMNS = 7
|
||||||
|
(VOL_COLUMN_KEY,
|
||||||
|
@@ -45,13 +45,13 @@ VOL_NUM_COLUMNS = 7
|
||||||
|
VOL_COLUMN_SIZESTR,
|
||||||
|
VOL_COLUMN_FORMAT,
|
||||||
|
VOL_COLUMN_INUSEBY,
|
||||||
|
- VOL_COLUMN_SENSITIVE) = range(VOL_NUM_COLUMNS)
|
||||||
|
+ VOL_COLUMN_SENSITIVE) = list(range(VOL_NUM_COLUMNS))
|
||||||
|
|
||||||
|
POOL_NUM_COLUMNS = 4
|
||||||
|
(POOL_COLUMN_CONNKEY,
|
||||||
|
POOL_COLUMN_LABEL,
|
||||||
|
POOL_COLUMN_ISACTIVE,
|
||||||
|
- POOL_COLUMN_PERCENT) = range(POOL_NUM_COLUMNS)
|
||||||
|
+ POOL_COLUMN_PERCENT) = list(range(POOL_NUM_COLUMNS))
|
||||||
|
|
||||||
|
ICON_RUNNING = "state_running"
|
||||||
|
ICON_SHUTOFF = "state_shutoff"
|
||||||
|
Index: virt-manager-1.4.3/virtManager/createnet.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.4.3.orig/virtManager/createnet.py
|
||||||
|
+++ virt-manager-1.4.3/virtManager/createnet.py
|
||||||
|
@@ -35,7 +35,7 @@ from .baseclass import vmmGObjectUI
|
||||||
|
(PAGE_NAME,
|
||||||
|
PAGE_IPV4,
|
||||||
|
PAGE_IPV6,
|
||||||
|
-PAGE_MISC) = range(4)
|
||||||
|
+PAGE_MISC) = list(range(4))
|
||||||
|
|
||||||
|
PAGE_MAX = PAGE_MISC
|
||||||
|
|
20
virtmisc-python2-to-python3-conversion.patch
Normal file
20
virtmisc-python2-to-python3-conversion.patch
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
Index: virt-manager-1.4.3/virt-clone
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.4.3.orig/virt-clone
|
||||||
|
+++ virt-manager-1.4.3/virt-clone
|
||||||
|
@@ -1,4 +1,4 @@
|
||||||
|
-#!/usr/bin/env python2
|
||||||
|
+#!/usr/bin/python3
|
||||||
|
#
|
||||||
|
# Copyright(c) FUJITSU Limited 2007.
|
||||||
|
#
|
||||||
|
Index: virt-manager-1.4.3/virt-xml
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.4.3.orig/virt-xml
|
||||||
|
+++ virt-manager-1.4.3/virt-xml
|
||||||
|
@@ -1,4 +1,4 @@
|
||||||
|
-#!/usr/bin/env python2
|
||||||
|
+#!/usr/bin/python3
|
||||||
|
#
|
||||||
|
# Copyright 2013-2014 Red Hat, Inc.
|
||||||
|
# Cole Robinson <crobinso@redhat.com>
|
111
virttests-python2-to-python3-conversion.patch
Normal file
111
virttests-python2-to-python3-conversion.patch
Normal file
@ -0,0 +1,111 @@
|
|||||||
|
Index: virt-manager-1.4.3/tests/clitest.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.4.3.orig/tests/clitest.py
|
||||||
|
+++ virt-manager-1.4.3/tests/clitest.py
|
||||||
|
@@ -218,7 +218,7 @@ class Command(object):
|
||||||
|
|
||||||
|
try:
|
||||||
|
conn = None
|
||||||
|
- for idx in reversed(range(len(self.argv))):
|
||||||
|
+ for idx in reversed(list(range(len(self.argv)))):
|
||||||
|
if self.argv[idx] == "--connect":
|
||||||
|
conn = utils.openconn(self.argv[idx + 1])
|
||||||
|
break
|
||||||
|
Index: virt-manager-1.4.3/tests/uitests/utils.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.4.3.orig/tests/uitests/utils.py
|
||||||
|
+++ virt-manager-1.4.3/tests/uitests/utils.py
|
||||||
|
@@ -1,4 +1,4 @@
|
||||||
|
-from __future__ import print_function
|
||||||
|
+
|
||||||
|
|
||||||
|
import os
|
||||||
|
import re
|
||||||
|
Index: virt-manager-1.4.3/tests/utils.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.4.3.orig/tests/utils.py
|
||||||
|
+++ virt-manager-1.4.3/tests/utils.py
|
||||||
|
@@ -96,11 +96,11 @@ def openconn(uri):
|
||||||
|
conn.fetch_all_nodedevs()
|
||||||
|
|
||||||
|
_conn_cache[uri] = {}
|
||||||
|
- for key, value in conn._fetch_cache.items():
|
||||||
|
+ for key, value in list(conn._fetch_cache.items()):
|
||||||
|
_conn_cache[uri][key] = value[:]
|
||||||
|
|
||||||
|
# Prime the internal connection cache
|
||||||
|
- for key, value in _conn_cache[uri].items():
|
||||||
|
+ for key, value in list(_conn_cache[uri].items()):
|
||||||
|
conn._fetch_cache[key] = value[:]
|
||||||
|
|
||||||
|
def cb_cache_new_pool(poolobj):
|
||||||
|
Index: virt-manager-1.4.3/tests/test_inject.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.4.3.orig/tests/test_inject.py
|
||||||
|
+++ virt-manager-1.4.3/tests/test_inject.py
|
||||||
|
@@ -1,7 +1,7 @@
|
||||||
|
#!/usr/bin/env python2
|
||||||
|
# Copyright (C) 2013, 2014 Red Hat, Inc.
|
||||||
|
|
||||||
|
-from __future__ import print_function
|
||||||
|
+
|
||||||
|
|
||||||
|
import atexit
|
||||||
|
import os
|
||||||
|
@@ -29,7 +29,7 @@ FEDORA_URL = "http://dl.fedoraproject.or
|
||||||
|
|
||||||
|
(WARN_RHEL4,
|
||||||
|
WARN_RHEL5,
|
||||||
|
- WARN_LATEST) = range(1, 4)
|
||||||
|
+ WARN_LATEST) = list(range(1, 4))
|
||||||
|
|
||||||
|
|
||||||
|
def prompt():
|
||||||
|
@@ -185,7 +185,7 @@ def _make_tests():
|
||||||
|
return lambda s: _test_distro(_d)
|
||||||
|
|
||||||
|
idx = 0
|
||||||
|
- for dname, dobj in _alldistros.items():
|
||||||
|
+ for dname, dobj in list(_alldistros.items()):
|
||||||
|
idx += 1
|
||||||
|
setattr(FetchTests, "testFetch%.3d_%s" %
|
||||||
|
(idx, dname.replace("-", "_")), _make_fetch_cb(dobj))
|
||||||
|
Index: virt-manager-1.4.3/tests/test_urls.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.4.3.orig/tests/test_urls.py
|
||||||
|
+++ virt-manager-1.4.3/tests/test_urls.py
|
||||||
|
@@ -346,7 +346,7 @@ def _make_tests():
|
||||||
|
d.distroclass = None
|
||||||
|
urls[d.name] = d
|
||||||
|
|
||||||
|
- keys = urls.keys()
|
||||||
|
+ keys = list(urls.keys())
|
||||||
|
keys.sort()
|
||||||
|
for key in keys:
|
||||||
|
distroobj = urls[key]
|
||||||
|
Index: virt-manager-1.4.3/tests/virtconvtest.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.4.3.orig/tests/virtconvtest.py
|
||||||
|
+++ virt-manager-1.4.3/tests/virtconvtest.py
|
||||||
|
@@ -15,7 +15,7 @@
|
||||||
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
|
# MA 02110-1301 USA.
|
||||||
|
|
||||||
|
-from __future__ import print_function
|
||||||
|
+
|
||||||
|
|
||||||
|
import glob
|
||||||
|
import io
|
||||||
|
Index: virt-manager-1.4.3/tests/nodedev.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.4.3.orig/tests/nodedev.py
|
||||||
|
+++ virt-manager-1.4.3/tests/nodedev.py
|
||||||
|
@@ -69,7 +69,7 @@ class TestNodeDev(unittest.TestCase):
|
||||||
|
|
||||||
|
def _testCompare(self, devname, vals, devxml=None):
|
||||||
|
def _compare(dev, vals, root=""):
|
||||||
|
- for attr in vals.keys():
|
||||||
|
+ for attr in list(vals.keys()):
|
||||||
|
expect = vals[attr]
|
||||||
|
actual = getattr(dev, attr)
|
||||||
|
if isinstance(expect, list):
|
Loading…
Reference in New Issue
Block a user