[PATCH] Handle the case of rpmostreepayload + GRUB2

Brian C. Lane bcl at redhat.com
Thu Oct 16 22:31:28 UTC 2014


On Thu, Oct 16, 2014 at 06:10:01PM -0400, Colin Walters wrote:
> 
> 
> On Thu, Oct 16, 2014, at 06:03 PM, Brian C. Lane wrote:
> > On Thu, Oct 16, 2014 at 10:17:12AM -0400, Colin Walters wrote:
> > > +        boot_extlinux = boot + '/extlinux'
> > > +        if os.path.isdir(boot_extlinux):
> > > +            boot_syslinux = boot + '/syslinux'
> > > +            boot_loader = boot + '/loader'
> > > +            assert os.path.isdir(boot_loader)
> > 
> > Why the assert? If that fails it's going to blow up the installation
> > with a traceback. It would be better to handle the error in some clean
> > way.
> 
> What would be a clean way?  I can't think of anything to do other than
> to fail hard.
> 
> This assertion actually isn't the most likely to trip - what seems more
> likely to break is grub2/extlinux change the location of their files and
> rpmostreepayload isn't changed.
> 
> But the only way I can think of to handle that is automated testing.

Take a look at the errorHandler code used in the other payloads:

if errorHandler.cb(exn) == ERROR_RAISE:

-- 
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)


More information about the anaconda-patches mailing list