Re: [PATCH 3/4] Fix test for unsupported format type in kickstart.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2012-02-27 at 16:56 -0800, Brian C. Lane wrote:
> On Mon, Feb 27, 2012 at 04:37:16PM -0600, David Lehman wrote:
> > ---
> >  pyanaconda/kickstart.py |    6 +++---
> >  1 files changed, 3 insertions(+), 3 deletions(-)
> > 
> > diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py
> > index aede8da..23c624a 100644
> > --- a/pyanaconda/kickstart.py
> > +++ b/pyanaconda/kickstart.py
> > @@ -559,7 +559,7 @@ class LogVolData(commands.logvol.F15_LogVolData):
> >                             label=self.label,
> >                             fsprofile=self.fsprofile,
> >                             mountopts=self.fsopts)
> > -        if not format:
> > +        if not format.type:
> >              raise KickstartValueError, formatErrorMsg(self.lineno, msg="The \"%s\" filesystem type is not supported." % type)
> >  
> >          # If we were given a pre-existing LV to create a filesystem on, we need
> > @@ -878,7 +878,7 @@ class PartitionData(commands.partition.F12_PartData):
> >                                       label=self.label,
> >                                       fsprofile=self.fsprofile,
> >                                       mountopts=self.fsopts)
> > -        if not kwargs["format"]:
> > +        if not kwargs["format"].type:
> >              raise KickstartValueError, formatErrorMsg(self.lineno, msg="The \"%s\" filesystem type is not supported." % type)
> >  
> >          # If we were given a specific disk to create the partition on, verify
> > @@ -1051,7 +1051,7 @@ class RaidData(commands.raid.F15_RaidData):
> >                                       fsprofile=self.fsprofile,
> >                                       mountpoint=self.mountpoint,
> >                                       mountopts=self.fsopts)
> > -        if not kwargs["format"]:
> > +        if not kwargs["format"].type:
> >              raise KickstartValueError, formatErrorMsg(self.lineno, msg="The \"%s\" filesystem type is not supported." % type)
> >  
> >          kwargs["name"] = devicename
> > -- 
> > 1.7.7.6
> 
> I think all of these should test if not format or not format.type since
> getFormat() can return None.

It actually cannot return None. That comment is wrong. If you look at
get_device_format_class, it will return DeviceFormat if it couldn't do
any better.

> 
> _______________________________________________
> Anaconda-devel-list mailing list
> Anaconda-devel-list@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/anaconda-devel-list


_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux