ba698f40db
9a9f9ecd-ignore-comments-in-keymap-conf-files.patch 9617d126-systray-Use-APPLICATION_STATUS-for-appindicator.patch e73abe5a-diskbackend-convert-to-long-the-calculated-size.patch 6e6f59e7-diskbackend-get-a-proper-size-of-existing-block-device-while-cloning.patch 23aaf852-network-Set-bridge-name-to-None-instead-of-blank.patch d1e1cf64-progress-remove-trailing-white-space.patch 63fce081-pycodestyle-Use-isinstance-for-type-checking.patch 08a58d61-pycodestyle-remove-description-of-fixed-errors.patch bc3c9a9d-progress-remove-unused-import.patch 2d276ebe-progress-dont-overwrite-format.patch e2ad4b2f-convert-iteritems-to-items.patch dff00d4f-remove-deprecated-statvfs-module.patch 75210ed3-replace-StringIO-with-io.patch a2bcd6c4-dont-compare-between-None-and-int.patch 44de92b7-use-reload-from-imp-module.patch 69c84bea-import-reduce-from-functools-module.patch 37ea5207-replace-StandardError-with-Exception.patch f41aafc7-Use-enumerate-instead-of-range-and-len.patch 91c0669c-cli-Fix-OrderedDict-mutated-during-iteration-on-python3.patch b8fa0c6b-xmlnsqemu-order-XML-output-like-libvirt-does.patch d2648d81-virtconv-dont-implicitly-depend-on-dict-hash-order.patch 999dbb36-cli-Make-VirtCLIArgument-instantiation-less-crazy.patch 7f1b4cee-pycodestyle-fix-all-E125-warnings.patch d82022bd-manager-drop-python2-only-cmp-usage.patch 374a3779-urlfetcher-write-test-file-as-binary-content.patch f7c8cf9f-devicepanic-dont-return-empty-model-list.patch 3be78d1f-addhardware-dont-allow-panic-option-where-not-supported.patch 73de8285-systray-remove-redundant-variable-assignment.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=375
459 lines
19 KiB
Diff
459 lines
19 KiB
Diff
Subject: pycodestyle: fix all E125 warnings
|
||
From: Chen Hanxiao chenhanxiao@gmail.com Wed Sep 20 15:36:27 2017 +0800
|
||
Date: Sat Oct 21 23:26:16 2017 +0800:
|
||
Git: 7f1b4cee822855f683b8f38f38c6b1483911a5a5
|
||
|
||
Fix all E125:
|
||
Continuation line with same indent as next logical line
|
||
|
||
Also remove ignore options of E125
|
||
|
||
Signed-off-by: Chen Hanxiao <chenhanxiao@gmail.com>
|
||
|
||
diff --git a/tests/pycodestyle.cfg b/tests/pycodestyle.cfg
|
||
index 4ba9cf60..a2ccb552 100644
|
||
--- a/tests/pycodestyle.cfg
|
||
+++ b/tests/pycodestyle.cfg
|
||
@@ -9,7 +9,6 @@ format = pylint
|
||
# E122: Continuation line missing indentation or outdented
|
||
# E123: Closing bracket does not match indentation of opening
|
||
# bracket's line
|
||
-# E125: Continuation line with same indent as next logical line
|
||
# E126: Continuation line over-indented for hanging indent
|
||
# E127: Continuation line over-indented for visual indent
|
||
# E128: Continuation line under-indented for visual indent
|
||
@@ -25,4 +24,4 @@ format = pylint
|
||
# E741: Do not use variables named ‘l’, ‘O’, or ‘I’
|
||
|
||
|
||
-ignore = E122, E123, E125, E126, E127, E128, E129, E221, E241, E301, E303, E305, E306, E402, E501, E741
|
||
+ignore = E122, E123, E126, E127, E128, E129, E221, E241, E301, E303, E305, E306, E402, E501, E741
|
||
diff --git a/virt-xml b/virt-xml
|
||
index 59d6c4fe..750498b6 100755
|
||
--- a/virt-xml
|
||
+++ b/virt-xml
|
||
@@ -256,7 +256,7 @@ def setup_device(dev):
|
||
def define_changes(conn, inactive_xmlobj, devs, action, confirm):
|
||
if confirm:
|
||
if not prompt_yes_or_no(
|
||
- _("Define '%s' with the changed XML?") % inactive_xmlobj.name):
|
||
+ _("Define '%s' with the changed XML?") % inactive_xmlobj.name):
|
||
return False
|
||
|
||
if action == "hotplug":
|
||
diff --git a/virtManager/connection.py b/virtManager/connection.py
|
||
index 0f7e20db..c98fff3d 100644
|
||
--- a/virtManager/connection.py
|
||
+++ b/virtManager/connection.py
|
||
@@ -539,13 +539,13 @@ class vmmConnection(vmmGObject):
|
||
inact = 0
|
||
|
||
if self.check_support(
|
||
- self._backend.SUPPORT_DOMAIN_XML_INACTIVE, vm):
|
||
+ self._backend.SUPPORT_DOMAIN_XML_INACTIVE, vm):
|
||
inact = libvirt.VIR_DOMAIN_XML_INACTIVE
|
||
else:
|
||
logging.debug("Domain XML inactive flag not supported.")
|
||
|
||
if self.check_support(
|
||
- self._backend.SUPPORT_DOMAIN_XML_SECURE, vm):
|
||
+ self._backend.SUPPORT_DOMAIN_XML_SECURE, vm):
|
||
inact |= libvirt.VIR_DOMAIN_XML_SECURE
|
||
act = libvirt.VIR_DOMAIN_XML_SECURE
|
||
else:
|
||
@@ -563,7 +563,7 @@ class vmmConnection(vmmGObject):
|
||
inact = 0
|
||
|
||
if self.check_support(
|
||
- self._backend.SUPPORT_INTERFACE_XML_INACTIVE, iface):
|
||
+ self._backend.SUPPORT_INTERFACE_XML_INACTIVE, iface):
|
||
inact = libvirt.VIR_INTERFACE_XML_INACTIVE
|
||
else:
|
||
logging.debug("Interface XML inactive flag not supported.")
|
||
diff --git a/virtManager/details.py b/virtManager/details.py
|
||
index aeac7fd3..a51f5623 100644
|
||
--- a/virtManager/details.py
|
||
+++ b/virtManager/details.py
|
||
@@ -1129,12 +1129,12 @@ class vmmDetails(vmmGObjectUI):
|
||
return False
|
||
|
||
if not self.err.chkbox_helper(
|
||
- self.config.get_confirm_unapplied,
|
||
- self.config.set_confirm_unapplied,
|
||
- text1=(_("There are unapplied changes. Would you like to apply "
|
||
- "them now?")),
|
||
- chktext=_("Don't warn me again."),
|
||
- default=False):
|
||
+ self.config.get_confirm_unapplied,
|
||
+ self.config.set_confirm_unapplied,
|
||
+ text1=(_("There are unapplied changes. Would you like to apply "
|
||
+ "them now?")),
|
||
+ chktext=_("Don't warn me again."),
|
||
+ default=False):
|
||
return False
|
||
|
||
return not self.config_apply(row=row)
|
||
@@ -2275,8 +2275,8 @@ class vmmDetails(vmmGObjectUI):
|
||
logging.debug("Removing device: %s", devobj)
|
||
|
||
if not self.err.chkbox_helper(self.config.get_confirm_removedev,
|
||
- self.config.set_confirm_removedev,
|
||
- text1=(_("Are you sure you want to remove this device?"))):
|
||
+ self.config.set_confirm_removedev,
|
||
+ text1=(_("Are you sure you want to remove this device?"))):
|
||
return
|
||
|
||
# Define the change
|
||
diff --git a/virtManager/domain.py b/virtManager/domain.py
|
||
index 1b278815..a1f59e38 100644
|
||
--- a/virtManager/domain.py
|
||
+++ b/virtManager/domain.py
|
||
@@ -500,7 +500,7 @@ class vmmDomain(vmmLibvirtObject):
|
||
|
||
def snapshots_supported(self):
|
||
if not self.conn.check_support(
|
||
- self.conn.SUPPORT_DOMAIN_LIST_SNAPSHOTS, self._backend):
|
||
+ self.conn.SUPPORT_DOMAIN_LIST_SNAPSHOTS, self._backend):
|
||
return _("Libvirt connection does not support snapshots.")
|
||
|
||
if self.list_snapshots():
|
||
@@ -644,8 +644,8 @@ class vmmDomain(vmmLibvirtObject):
|
||
self._redefine_xmlobj(xmlobj)
|
||
|
||
def define_cpu(self, vcpus=_SENTINEL, maxvcpus=_SENTINEL,
|
||
- model=_SENTINEL, sockets=_SENTINEL,
|
||
- cores=_SENTINEL, threads=_SENTINEL):
|
||
+ model=_SENTINEL, sockets=_SENTINEL,
|
||
+ cores=_SENTINEL, threads=_SENTINEL):
|
||
guest = self._make_xmlobj_to_define()
|
||
|
||
if vcpus != _SENTINEL:
|
||
@@ -675,8 +675,8 @@ class vmmDomain(vmmLibvirtObject):
|
||
self._redefine_xmlobj(guest)
|
||
|
||
def define_overview(self, machine=_SENTINEL, description=_SENTINEL,
|
||
- title=_SENTINEL, idmap_list=_SENTINEL, loader=_SENTINEL,
|
||
- nvram=_SENTINEL):
|
||
+ title=_SENTINEL, idmap_list=_SENTINEL, loader=_SENTINEL,
|
||
+ nvram=_SENTINEL):
|
||
guest = self._make_xmlobj_to_define()
|
||
if machine != _SENTINEL:
|
||
guest.os.machine = machine
|
||
@@ -720,8 +720,8 @@ class vmmDomain(vmmLibvirtObject):
|
||
self._redefine_xmlobj(guest)
|
||
|
||
def define_boot(self, boot_order=_SENTINEL, boot_menu=_SENTINEL,
|
||
- kernel=_SENTINEL, initrd=_SENTINEL, dtb=_SENTINEL,
|
||
- kernel_args=_SENTINEL, init=_SENTINEL, initargs=_SENTINEL):
|
||
+ kernel=_SENTINEL, initrd=_SENTINEL, dtb=_SENTINEL,
|
||
+ kernel_args=_SENTINEL, init=_SENTINEL, initargs=_SENTINEL):
|
||
|
||
guest = self._make_xmlobj_to_define()
|
||
def _change_boot_order():
|
||
@@ -776,10 +776,10 @@ class vmmDomain(vmmLibvirtObject):
|
||
######################
|
||
|
||
def define_disk(self, devobj, do_hotplug,
|
||
- path=_SENTINEL, readonly=_SENTINEL, serial=_SENTINEL,
|
||
- shareable=_SENTINEL, removable=_SENTINEL, cache=_SENTINEL,
|
||
- io=_SENTINEL, driver_type=_SENTINEL, bus=_SENTINEL, addrstr=_SENTINEL,
|
||
- sgio=_SENTINEL):
|
||
+ path=_SENTINEL, readonly=_SENTINEL, serial=_SENTINEL,
|
||
+ shareable=_SENTINEL, removable=_SENTINEL, cache=_SENTINEL,
|
||
+ io=_SENTINEL, driver_type=_SENTINEL, bus=_SENTINEL, addrstr=_SENTINEL,
|
||
+ sgio=_SENTINEL):
|
||
xmlobj = self._make_xmlobj_to_define()
|
||
editdev = self._lookup_device_to_define(xmlobj, devobj, do_hotplug)
|
||
if not editdev:
|
||
@@ -844,11 +844,11 @@ class vmmDomain(vmmLibvirtObject):
|
||
self._redefine_xmlobj(xmlobj)
|
||
|
||
def define_network(self, devobj, do_hotplug,
|
||
- ntype=_SENTINEL, source=_SENTINEL,
|
||
- mode=_SENTINEL, model=_SENTINEL, addrstr=_SENTINEL,
|
||
- vtype=_SENTINEL, managerid=_SENTINEL, typeid=_SENTINEL,
|
||
- typeidversion=_SENTINEL, instanceid=_SENTINEL,
|
||
- portgroup=_SENTINEL, macaddr=_SENTINEL):
|
||
+ ntype=_SENTINEL, source=_SENTINEL,
|
||
+ mode=_SENTINEL, model=_SENTINEL, addrstr=_SENTINEL,
|
||
+ vtype=_SENTINEL, managerid=_SENTINEL, typeid=_SENTINEL,
|
||
+ typeidversion=_SENTINEL, instanceid=_SENTINEL,
|
||
+ portgroup=_SENTINEL, macaddr=_SENTINEL):
|
||
xmlobj = self._make_xmlobj_to_define()
|
||
editdev = self._lookup_device_to_define(xmlobj, devobj, do_hotplug)
|
||
if not editdev:
|
||
@@ -884,9 +884,9 @@ class vmmDomain(vmmLibvirtObject):
|
||
self._redefine_xmlobj(xmlobj)
|
||
|
||
def define_graphics(self, devobj, do_hotplug,
|
||
- listen=_SENTINEL, addr=_SENTINEL, port=_SENTINEL, tlsport=_SENTINEL,
|
||
- passwd=_SENTINEL, keymap=_SENTINEL, gtype=_SENTINEL,
|
||
- gl=_SENTINEL, rendernode=_SENTINEL):
|
||
+ listen=_SENTINEL, addr=_SENTINEL, port=_SENTINEL, tlsport=_SENTINEL,
|
||
+ passwd=_SENTINEL, keymap=_SENTINEL, gtype=_SENTINEL,
|
||
+ gl=_SENTINEL, rendernode=_SENTINEL):
|
||
xmlobj = self._make_xmlobj_to_define()
|
||
editdev = self._lookup_device_to_define(xmlobj, devobj, do_hotplug)
|
||
if not editdev:
|
||
@@ -964,7 +964,7 @@ class vmmDomain(vmmLibvirtObject):
|
||
self._redefine_xmlobj(xmlobj)
|
||
|
||
def define_watchdog(self, devobj, do_hotplug,
|
||
- model=_SENTINEL, action=_SENTINEL):
|
||
+ model=_SENTINEL, action=_SENTINEL):
|
||
xmlobj = self._make_xmlobj_to_define()
|
||
editdev = self._lookup_device_to_define(xmlobj, devobj, do_hotplug)
|
||
if not editdev:
|
||
@@ -1109,7 +1109,7 @@ class vmmDomain(vmmLibvirtObject):
|
||
self._backend.updateDeviceFlags(xml, flags)
|
||
|
||
def hotplug(self, vcpus=_SENTINEL, memory=_SENTINEL, maxmem=_SENTINEL,
|
||
- description=_SENTINEL, title=_SENTINEL, device=_SENTINEL):
|
||
+ description=_SENTINEL, title=_SENTINEL, device=_SENTINEL):
|
||
if not self.is_active():
|
||
return
|
||
|
||
@@ -1570,7 +1570,7 @@ class vmmDomain(vmmLibvirtObject):
|
||
|
||
|
||
def migrate(self, destconn, dest_uri=None,
|
||
- tunnel=False, unsafe=False, temporary=False, meter=None):
|
||
+ tunnel=False, unsafe=False, temporary=False, meter=None):
|
||
self._install_abort = True
|
||
|
||
flags = 0
|
||
diff --git a/virtManager/engine.py b/virtManager/engine.py
|
||
index 537d1c91..d8f86e38 100644
|
||
--- a/virtManager/engine.py
|
||
+++ b/virtManager/engine.py
|
||
@@ -1075,8 +1075,8 @@ class vmmEngine(vmmGObject):
|
||
vm = conn.get_vm(connkey)
|
||
|
||
if not src.err.chkbox_helper(self.config.get_confirm_poweroff,
|
||
- self.config.set_confirm_poweroff,
|
||
- text1=_("Are you sure you want to save '%s'?") % vm.get_name()):
|
||
+ self.config.set_confirm_poweroff,
|
||
+ text1=_("Are you sure you want to save '%s'?") % vm.get_name()):
|
||
return
|
||
|
||
_cancel_cb = None
|
||
diff --git a/virtManager/netlist.py b/virtManager/netlist.py
|
||
index 0bb17965..bd53af56 100644
|
||
--- a/virtManager/netlist.py
|
||
+++ b/virtManager/netlist.py
|
||
@@ -129,7 +129,7 @@ class vmmNetworkList(vmmGObjectUI):
|
||
return ret
|
||
|
||
def _build_source_row(self, nettype, source_name,
|
||
- label, is_sensitive, is_running, manual_bridge=False, key=None):
|
||
+ label, is_sensitive, is_running, manual_bridge=False, key=None):
|
||
return [nettype, source_name, label,
|
||
is_sensitive, is_running, manual_bridge,
|
||
key]
|
||
diff --git a/virtManager/viewers.py b/virtManager/viewers.py
|
||
index df164f59..07a7435f 100644
|
||
--- a/virtManager/viewers.py
|
||
+++ b/virtManager/viewers.py
|
||
@@ -625,7 +625,7 @@ class SpiceViewer(Viewer):
|
||
self._main_channel_hids.append(hid)
|
||
|
||
elif (type(channel) == SpiceClientGLib.DisplayChannel and
|
||
- not self._display):
|
||
+ not self._display):
|
||
channel_id = channel.get_property("channel-id")
|
||
|
||
if channel_id != 0:
|
||
@@ -640,7 +640,7 @@ class SpiceViewer(Viewer):
|
||
|
||
elif (type(channel) in [SpiceClientGLib.PlaybackChannel,
|
||
SpiceClientGLib.RecordChannel] and
|
||
- not self._audio):
|
||
+ not self._audio):
|
||
self._audio = SpiceClientGLib.Audio.get(self._spice_session, None)
|
||
|
||
def _agent_connected_cb(self, src, val):
|
||
diff --git a/virtManager/vmmenu.py b/virtManager/vmmenu.py
|
||
index bb233609..153c8524 100644
|
||
--- a/virtManager/vmmenu.py
|
||
+++ b/virtManager/vmmenu.py
|
||
@@ -96,7 +96,7 @@ class VMShutdownMenu(_VMMenu):
|
||
if name == "reset":
|
||
child.set_tooltip_text(None)
|
||
if vm and not vm.conn.check_support(
|
||
- vm.conn.SUPPORT_CONN_DOMAIN_RESET):
|
||
+ vm.conn.SUPPORT_CONN_DOMAIN_RESET):
|
||
child.set_tooltip_text(_("Hypervisor does not support "
|
||
"domain reset."))
|
||
child.set_sensitive(False)
|
||
diff --git a/virtinst/cli.py b/virtinst/cli.py
|
||
index 2d1c33e5..cfe5ff07 100644
|
||
--- a/virtinst/cli.py
|
||
+++ b/virtinst/cli.py
|
||
@@ -486,8 +486,8 @@ def get_console_cb(guest):
|
||
|
||
gtype = gdevs[0].type
|
||
if gtype not in ["default",
|
||
- VirtualGraphics.TYPE_VNC,
|
||
- VirtualGraphics.TYPE_SPICE]:
|
||
+ VirtualGraphics.TYPE_VNC,
|
||
+ VirtualGraphics.TYPE_SPICE]:
|
||
logging.debug("No viewer to launch for graphics type '%s'", gtype)
|
||
return
|
||
|
||
diff --git a/virtinst/devicegraphics.py b/virtinst/devicegraphics.py
|
||
index dc6919e9..ffba36d9 100644
|
||
--- a/virtinst/devicegraphics.py
|
||
+++ b/virtinst/devicegraphics.py
|
||
@@ -242,7 +242,7 @@ class VirtualGraphics(VirtualDevice):
|
||
self.socket = None
|
||
|
||
if self.conn.check_support(
|
||
- self.conn.SUPPORT_CONN_GRAPHICS_LISTEN_NONE):
|
||
+ self.conn.SUPPORT_CONN_GRAPHICS_LISTEN_NONE):
|
||
obj = self.add_listen()
|
||
obj.type = "none"
|
||
|
||
diff --git a/virtinst/domcapabilities.py b/virtinst/domcapabilities.py
|
||
index 3629afe1..be2281a6 100644
|
||
--- a/virtinst/domcapabilities.py
|
||
+++ b/virtinst/domcapabilities.py
|
||
@@ -81,7 +81,7 @@ class DomainCapabilities(XMLBuilder):
|
||
def build_from_params(conn, emulator, arch, machine, hvtype):
|
||
xml = None
|
||
if conn.check_support(
|
||
- conn.SUPPORT_CONN_DOMAIN_CAPABILITIES):
|
||
+ conn.SUPPORT_CONN_DOMAIN_CAPABILITIES):
|
||
try:
|
||
xml = conn.getDomainCapabilities(emulator, arch,
|
||
machine, hvtype)
|
||
diff --git a/virtinst/guest.py b/virtinst/guest.py
|
||
index 143a36f2..eaf83ffc 100644
|
||
--- a/virtinst/guest.py
|
||
+++ b/virtinst/guest.py
|
||
@@ -690,7 +690,7 @@ class Guest(XMLBuilder):
|
||
|
||
if usb2:
|
||
if not self.conn.check_support(
|
||
- self.conn.SUPPORT_CONN_DEFAULT_USB2):
|
||
+ self.conn.SUPPORT_CONN_DEFAULT_USB2):
|
||
return
|
||
for dev in VirtualController.get_usb2_controllers(self.conn):
|
||
self.add_device(dev)
|
||
@@ -830,7 +830,7 @@ class Guest(XMLBuilder):
|
||
if not self.os.is_x86():
|
||
return
|
||
if not self.conn.check_support(
|
||
- self.conn.SUPPORT_CONN_ADVANCED_CLOCK):
|
||
+ self.conn.SUPPORT_CONN_ADVANCED_CLOCK):
|
||
return
|
||
|
||
# Set clock policy that maps to qemu options:
|
||
diff --git a/virtinst/osdict.py b/virtinst/osdict.py
|
||
index 429f8005..c173554b 100644
|
||
--- a/virtinst/osdict.py
|
||
+++ b/virtinst/osdict.py
|
||
@@ -300,7 +300,7 @@ class _OsVariant(object):
|
||
########################
|
||
|
||
def _is_related_to(self, related_os_list, os=None,
|
||
- check_derives=True, check_upgrades=True, check_clones=True):
|
||
+ check_derives=True, check_upgrades=True, check_clones=True):
|
||
os = os or self._os
|
||
if not os:
|
||
return False
|
||
diff --git a/virtinst/pollhelpers.py b/virtinst/pollhelpers.py
|
||
index fd156bb9..64cdb32c 100644
|
||
--- a/virtinst/pollhelpers.py
|
||
+++ b/virtinst/pollhelpers.py
|
||
@@ -115,7 +115,7 @@ def fetch_nets(backend, origmap, build_func):
|
||
name = "network"
|
||
|
||
if backend.check_support(
|
||
- backend.SUPPORT_CONN_LISTALLNETWORKS) and not FORCE_OLD_POLL:
|
||
+ backend.SUPPORT_CONN_LISTALLNETWORKS) and not FORCE_OLD_POLL:
|
||
return _new_poll_helper(origmap, name,
|
||
backend.listAllNetworks, build_func)
|
||
else:
|
||
@@ -132,7 +132,7 @@ def fetch_pools(backend, origmap, build_func):
|
||
name = "pool"
|
||
|
||
if backend.check_support(
|
||
- backend.SUPPORT_CONN_LISTALLSTORAGEPOOLS) and not FORCE_OLD_POLL:
|
||
+ backend.SUPPORT_CONN_LISTALLSTORAGEPOOLS) and not FORCE_OLD_POLL:
|
||
return _new_poll_helper(origmap, name,
|
||
backend.listAllStoragePools, build_func)
|
||
else:
|
||
@@ -149,7 +149,7 @@ def fetch_volumes(backend, pool, origmap, build_func):
|
||
name = "volume"
|
||
|
||
if backend.check_support(
|
||
- backend.SUPPORT_POOL_LISTALLVOLUMES, pool) and not FORCE_OLD_POLL:
|
||
+ backend.SUPPORT_POOL_LISTALLVOLUMES, pool) and not FORCE_OLD_POLL:
|
||
return _new_poll_helper(origmap, name,
|
||
pool.listAllVolumes, build_func)
|
||
else:
|
||
@@ -166,7 +166,7 @@ def fetch_interfaces(backend, origmap, build_func):
|
||
name = "interface"
|
||
|
||
if backend.check_support(
|
||
- backend.SUPPORT_CONN_LISTALLINTERFACES) and not FORCE_OLD_POLL:
|
||
+ backend.SUPPORT_CONN_LISTALLINTERFACES) and not FORCE_OLD_POLL:
|
||
return _new_poll_helper(origmap, name,
|
||
backend.listAllInterfaces, build_func)
|
||
else:
|
||
@@ -182,7 +182,7 @@ def fetch_interfaces(backend, origmap, build_func):
|
||
def fetch_nodedevs(backend, origmap, build_func):
|
||
name = "nodedev"
|
||
if backend.check_support(
|
||
- backend.SUPPORT_CONN_LISTALLDEVICES) and not FORCE_OLD_POLL:
|
||
+ backend.SUPPORT_CONN_LISTALLDEVICES) and not FORCE_OLD_POLL:
|
||
return _new_poll_helper(origmap, name,
|
||
backend.listAllDevices, build_func)
|
||
else:
|
||
@@ -278,7 +278,7 @@ def _old_fetch_vms(backend, origmap, build_func):
|
||
def fetch_vms(backend, origmap, build_func):
|
||
name = "domain"
|
||
if backend.check_support(
|
||
- backend.SUPPORT_CONN_LISTALLDOMAINS):
|
||
+ backend.SUPPORT_CONN_LISTALLDOMAINS):
|
||
return _new_poll_helper(origmap, name,
|
||
backend.listAllDomains, build_func)
|
||
else:
|
||
diff --git a/virtinst/storage.py b/virtinst/storage.py
|
||
index 3f1bd9f5..254e7ff6 100644
|
||
--- a/virtinst/storage.py
|
||
+++ b/virtinst/storage.py
|
||
@@ -375,8 +375,8 @@ class StoragePool(_StorageObject):
|
||
elif self.type == StoragePool.TYPE_GLUSTER:
|
||
srcname = "gv0"
|
||
elif ("target_path" in self._propstore and
|
||
- self.target_path and
|
||
- self.target_path.startswith(_DEFAULT_LVM_TARGET_BASE)):
|
||
+ self.target_path and
|
||
+ self.target_path.startswith(_DEFAULT_LVM_TARGET_BASE)):
|
||
# If there is a target path, parse it for an expected VG
|
||
# location, and pull the name from there
|
||
vg = self.target_path[len(_DEFAULT_LVM_TARGET_BASE):]
|
||
@@ -642,7 +642,7 @@ class StorageVolume(_StorageObject):
|
||
raise ValueError(_("input_vol must be a virStorageVol"))
|
||
|
||
if not self.conn.check_support(
|
||
- self.conn.SUPPORT_POOL_CREATEVOLFROM, self.pool):
|
||
+ self.conn.SUPPORT_POOL_CREATEVOLFROM, self.pool):
|
||
raise ValueError(_("Creating storage from an existing volume is"
|
||
" not supported by this libvirt version."))
|
||
|
||
diff --git a/virtinst/urlfetcher.py b/virtinst/urlfetcher.py
|
||
index ebc5c7a4..a45c6383 100644
|
||
--- a/virtinst/urlfetcher.py
|
||
+++ b/virtinst/urlfetcher.py
|
||
@@ -448,7 +448,7 @@ def _distroFromSUSEContent(fetcher, arch, vmtype=None):
|
||
dclass = GenericDistro
|
||
if distribution:
|
||
if re.match(".*SUSE Linux Enterprise Server*", distribution[1]) or \
|
||
- re.match(".*SUSE SLES*", distribution[1]):
|
||
+ re.match(".*SUSE SLES*", distribution[1]):
|
||
dclass = SLESDistro
|
||
if distro_version is None:
|
||
distro_version = _parse_sle_distribution(distribution)
|