From acc6c52a8130a724cb35032fe7e0bd381fa7c9c7 Mon Sep 17 00:00:00 2001 From: zhufl Date: Mon, 6 May 2019 16:23:59 +0800 Subject: [PATCH] [Trivial fix]Remove unnecessary slash This is to remove the unncessary slash when the line doesn't exceed the length of 79, to make the code more readable. Change-Id: I4b82895649faf54596215ec7aa697be071af1bfb --- nova/network/os_vif_util.py | 3 +-- nova/servicegroup/drivers/mc.py | 3 +-- nova/virt/libvirt/driver.py | 6 ++---- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/nova/network/os_vif_util.py b/nova/network/os_vif_util.py index 11a4997d0065..d9f29c4245fe 100644 --- a/nova/network/os_vif_util.py +++ b/nova/network/os_vif_util.py @@ -232,8 +232,7 @@ def _nova_to_osvif_network(network): if network.get_meta("multi_host") is not None: netobj.multi_host = network.get_meta("multi_host") if network.get_meta("should_create_bridge") is not None: - netobj.should_provide_bridge = \ - network.get_meta("should_create_bridge") + netobj.should_provide_bridge = network.get_meta("should_create_bridge") if network.get_meta("should_create_vlan") is not None: netobj.should_provide_vlan = network.get_meta("should_create_vlan") if network.get_meta("vlan") is None: diff --git a/nova/servicegroup/drivers/mc.py b/nova/servicegroup/drivers/mc.py index 82dd23f8123a..506ff01ebc79 100644 --- a/nova/servicegroup/drivers/mc.py +++ b/nova/servicegroup/drivers/mc.py @@ -77,8 +77,7 @@ class MemcachedDriver(base.Driver): if updated_time_in_mc: # Change mc time to offset-aware time - updated_time_in_mc = \ - updated_time_in_mc.replace(tzinfo=iso8601.UTC) + updated_time_in_mc = updated_time_in_mc.replace(tzinfo=iso8601.UTC) # If [DEFAULT]/enable_new_services is set to be false, the # ``updated_time_in_db`` will be None, in this case, use # ``updated_time_in_mc`` instead. diff --git a/nova/virt/libvirt/driver.py b/nova/virt/libvirt/driver.py index 0eb3eabd761f..2df3747f02f2 100644 --- a/nova/virt/libvirt/driver.py +++ b/nova/virt/libvirt/driver.py @@ -7140,8 +7140,7 @@ class LibvirtDriver(driver.ComputeDriver): available_least = disk_free_gb * units.Gi - disk_over_committed data['disk_available_least'] = available_least / units.Gi - data['pci_passthrough_devices'] = \ - self._get_pci_passthrough_devices() + data['pci_passthrough_devices'] = self._get_pci_passthrough_devices() numa_topology = self._get_host_numa_topology() if numa_topology: @@ -7253,8 +7252,7 @@ class LibvirtDriver(driver.ComputeDriver): if disk_over_commit is not None: data.disk_over_commit = disk_over_commit data.disk_available_mb = disk_available_mb - data.dst_wants_file_backed_memory = \ - CONF.libvirt.file_backed_memory > 0 + data.dst_wants_file_backed_memory = CONF.libvirt.file_backed_memory > 0 data.file_backed_memory_discard = (CONF.libvirt.file_backed_memory and self._host.has_min_version(MIN_LIBVIRT_FILE_BACKED_DISCARD_VERSION, MIN_QEMU_FILE_BACKED_DISCARD_VERSION))