[blivet:master 06/15] Make doFormat use regular style keyword parameters

Anne Mulhern amulhern at redhat.com
Fri May 9 21:16:21 UTC 2014


----- Original Message -----
> From: "David Lehman" <dlehman at redhat.com>
> To: anaconda-patches at lists.fedorahosted.org
> Sent: Friday, May 9, 2014 2:38:05 PM
> Subject: Re: [blivet:master 06/15] Make doFormat use regular style keyword	parameters
> 
> On 05/07/2014 06:05 PM, mulhern wrote:
> > doFormat is almost a leaf procedure and it is unlikely to find itself
> > calling procedures that require arbitrary arguments.
> >
> > Signed-off-by: mulhern <amulhern at redhat.com>
> > ---
> >   blivet/formats/fs.py | 8 +++-----
> >   1 file changed, 3 insertions(+), 5 deletions(-)
> >
> > diff --git a/blivet/formats/fs.py b/blivet/formats/fs.py
> > index 68e50a3..29886dd 100644
> > --- a/blivet/formats/fs.py
> > +++ b/blivet/formats/fs.py
> > @@ -357,18 +357,16 @@ class FS(DeviceFormat):
> >           argv.append(self.device)
> >           return argv
> >
> > -    def doFormat(self, *args, **kwargs):
> > +    def doFormat(self, options=None):
> 
> You also need to handle the device keyword, since we pass that when
> invoking format.create from ActionCreateFormat.
> 
> David
> _______________________________________________
> anaconda-patches mailing list
> anaconda-patches at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
> 

doFormat()'s body makes no use of any device keyword arg.
It relies on self.device having already been set by
DeviceFormat.create().

- mulhern


More information about the anaconda-patches mailing list