From 39f5cc8d0a1a64ce279d19d04515b13e90ffa139 Mon Sep 17 00:00:00 2001 From: Marian Horban Date: Tue, 10 Nov 2015 08:08:02 -0500 Subject: [PATCH] Avoid the dual-naming confusion The module 'driver' is an import and it is also a variable name, this can be confusing so rename it to be named differently. TrivialFix Change-Id: Ie45dd6901afdd7083a75adf75f73e99bfe304ab5 --- nova/virt/libvirt/driver.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/nova/virt/libvirt/driver.py b/nova/virt/libvirt/driver.py index b1cefb13d009..704be28ff291 100644 --- a/nova/virt/libvirt/driver.py +++ b/nova/virt/libvirt/driver.py @@ -1045,16 +1045,16 @@ class LibvirtDriver(driver.ComputeDriver): return self.volume_drivers[driver_type] def _connect_volume(self, connection_info, disk_info): - driver = self._get_volume_driver(connection_info) - driver.connect_volume(connection_info, disk_info) + vol_driver = self._get_volume_driver(connection_info) + vol_driver.connect_volume(connection_info, disk_info) def _disconnect_volume(self, connection_info, disk_dev): - driver = self._get_volume_driver(connection_info) - driver.disconnect_volume(connection_info, disk_dev) + vol_driver = self._get_volume_driver(connection_info) + vol_driver.disconnect_volume(connection_info, disk_dev) def _get_volume_config(self, connection_info, disk_info): - driver = self._get_volume_driver(connection_info) - return driver.get_config(connection_info, disk_info) + vol_driver = self._get_volume_driver(connection_info) + return vol_driver.get_config(connection_info, disk_info) def _get_volume_encryptor(self, connection_info, encryption): encryptor = encryptors.get_volume_encryptor(connection_info,