[blivet/master][PATCH] req_max_size is not a Size instance (#1077163)

Vratislav Podzimek vpodzime at redhat.com
Mon Mar 17 15:53:32 UTC 2014


On Mon, 2014-03-17 at 10:39 -0500, David Lehman wrote:
> On Mon, 2014-03-17 at 13:30 +0100, Vratislav Podzimek wrote:
> > req_max_size is an int value in mebibytes, so we shouldn't try to do any
> 
> req_max_size should be a Size instance. If it isn't, please fix that
> instead.
> 
> > conversion. The int() call is just to make it use the same code as the surround
> > lines.
> > 
> > Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
> > ---
> >  blivet/devices.py | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/blivet/devices.py b/blivet/devices.py
> > index 9e6efb4..91686c9 100644
> > --- a/blivet/devices.py
> > +++ b/blivet/devices.py
> > @@ -2811,7 +2811,7 @@ class LVMLogicalVolumeDevice(DMDevice):
> >              data.grow = self.req_grow
> >              if self.req_grow:
> >                  data.size = int(self.req_size)
> > -                data.maxSizeMB = self.req_max_size.convertTo(spec="mib")
> > +                data.maxSizeMB = int(self.req_max_size)
And what about self.req_size? I didn't check if it is Size instance or
not, but I'd expect it to be converted to "mib" instead of just calling
int() on it. They should all be Size instances, right?

-- 
Vratislav Podzimek

Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic



More information about the anaconda-patches mailing list