From 6b255d2a47ff2f7d841f994e026a7e00deb74008 Mon Sep 17 00:00:00 2001 From: Jon Bernard Date: Mon, 3 Feb 2014 12:44:33 -0500 Subject: [PATCH] LVM: remove redundant casts to float The vg_free_space field is always assigned a float, so additional casts are not necessary. Change-Id: Ic2af78ba7dbd7388cc071fc2f0ea876a1558d0e9 --- cinder/brick/local_dev/lvm.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cinder/brick/local_dev/lvm.py b/cinder/brick/local_dev/lvm.py index 781234f84..68b569d78 100644 --- a/cinder/brick/local_dev/lvm.py +++ b/cinder/brick/local_dev/lvm.py @@ -401,7 +401,7 @@ class LVM(executor.Executor): self.update_volume_group_info() # leave 5% free for metadata - return "%sg" % (float(self.vg_free_space) * 0.95) + return "%sg" % (self.vg_free_space * 0.95) def create_thin_pool(self, name=None, size_str=None): """Creates a thin provisioning pool for this VG. @@ -633,5 +633,4 @@ class LVM(executor.Executor): return free_capacity def vg_mirror_size(self, mirror_count): - return (float(self.vg_free_space) / - (mirror_count + 1)) + return (self.vg_free_space / (mirror_count + 1)) -- 2.45.2