From: Jon Bernard Date: Mon, 3 Feb 2014 17:44:33 +0000 (-0500) Subject: LVM: remove redundant casts to float X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=6b255d2a47ff2f7d841f994e026a7e00deb74008;p=openstack-build%2Fcinder-build.git 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 --- 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))