[blivet:master 6/7] Remove appendiceal assignments

Anne Mulhern amulhern at redhat.com
Thu Mar 27 20:28:50 UTC 2014





----- Original Message -----
> From: "David Lehman" <dlehman at redhat.com>
> To: "anaconda patch review" <anaconda-patches at lists.fedorahosted.org>
> Sent: Thursday, March 27, 2014 12:20:23 PM
> Subject: Re: [blivet:master 6/7] Remove appendiceal assignments
> 
> 
> One comment below.
> 
> ----- Original Message -----
> > From: "mulhern" <amulhern at redhat.com>
> > To: anaconda-patches at lists.fedorahosted.org
> > Sent: Thursday, March 27, 2014 9:39:02 AM
> > Subject: [blivet:master 6/7] Remove appendiceal assignments
> > 
> > These all look like they were valuable to some code once and that code went
> > away, but they remained.
> > 
> > Signed-off-by: mulhern <amulhern at redhat.com>
> > ---
> >  blivet/__init__.py      | 1 -
> >  blivet/devicefactory.py | 1 -
> >  blivet/devicetree.py    | 7 -------
> >  blivet/partitioning.py  | 4 ----
> >  tests/size_test.py      | 1 -
> >  5 files changed, 14 deletions(-)
> > 
> <snip>
> > diff --git a/blivet/partitioning.py b/blivet/partitioning.py
> > index 3269ee4..7755be5 100644
> > --- a/blivet/partitioning.py
> > +++ b/blivet/partitioning.py
> > @@ -1002,7 +1002,6 @@ def allocatePartitions(storage, disks, partitions,
> > freespace):
> >          # loop through disks
> >          for _disk in req_disks:
> >              disklabel = disklabels[_disk.path]
> > -            sectorSize = Size(bytes=disklabel.partedDevice.sectorSize)
> >              best = None
> >              current_free = free
> >  
> > @@ -1699,7 +1698,6 @@ class VGChunk(Chunk):
> >          self.sortRequests()
> >  
> >          # grow the percentage-based requests
> > -        last_pool = self.pool
> >          for req in self.requests:
> >              if req.done or not req.device.req_percent:
> >                  continue
> > @@ -1711,7 +1709,6 @@ class VGChunk(Chunk):
> >                          growth, self.lengthToSize(growth),
> >                          req.device.id, req.device.name)
> >  
> > -            new_base = self.trimOverGrownRequest(req)
> >              log.debug("new grow amount for request %d (%s) is %d "
> >                        "units, or %s",
> >                          req.device.id, req.device.name, req.growth,
> 
> The method call above should not be removed.
> _______________________________________________
> anaconda-patches mailing list
> anaconda-patches at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
> 

Whoops. Fixed in working copy, that is, removed change from original patch and added new patch, thus:

    Don't assign return value to unused variable
    
    But keep the call, for the side-effects.
    
    Signed-off-by: mulhern <amulhern at redhat.com>

diff --git a/blivet/partitioning.py b/blivet/partitioning.py
index 213d5cf..7d5860d 100644
--- a/blivet/partitioning.py
+++ b/blivet/partitioning.py
@@ -1709,7 +1709,7 @@ class VGChunk(Chunk):
                         growth, self.lengthToSize(growth),
                         req.device.id, req.device.name)
 
-            new_base = self.trimOverGrownRequest(req)
+            self.trimOverGrownRequest(req)
             log.debug("new grow amount for request %d (%s) is %d "
                       "units, or %s",
                         req.device.id, req.device.name, req.growth,

- mulhern


More information about the anaconda-patches mailing list