[anaconda:master 4/4] Remove keyword args 'ignoreErrors' from umountFilesystems() call.

Anne Mulhern amulhern at redhat.com
Mon May 5 14:47:28 UTC 2014





----- Original Message -----
> From: "Brian C. Lane" <bcl at redhat.com>
> To: anaconda-patches at lists.fedorahosted.org
> Sent: Friday, May 2, 2014 7:53:19 PM
> Subject: Re: [anaconda:master 4/4] Remove keyword args 'ignoreErrors' from	umountFilesystems() call.
> 
> On Thu, May 01, 2014 at 09:11:29AM -0400, mulhern wrote:
> > Required to adapt to the changed blivet interface.
> > 
> > Signed-off-by: mulhern <amulhern at redhat.com>
> > ---
> >  anaconda | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/anaconda b/anaconda
> > index 2f0256e..09f41df 100755
> > --- a/anaconda
> > +++ b/anaconda
> > @@ -69,7 +69,7 @@ def exitHandler(rebootData, storage, exitCode=None):
> >              time.sleep(10000)
> >  
> >      if image_count or flags.dirInstall:
> > -        anaconda.storage.umountFilesystems(ignoreErrors=True,
> > swapoff=False)
> > +        anaconda.storage.umountFilesystems(swapoff=False)
> >          devicetree = anaconda.storage.devicetree
> >          devicetree.teardownAll()
> >          for imageName in devicetree.diskImages:
> > --
> > 1.8.3.1
> 
> I don't see the new interface on blivet's master yet so I'll ask here:
> what's the behavior in this case? We need to be able to ignore umount
> errors here (I think because there may be mounts that are busy or ones
> we didn't mount when being run on a normal system).
> 
> Also don't forget to update anaconda.spec.in with the new blivet release
> number to match these.
> 
> --
> Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA
> (PST8PDT)
> _______________________________________________
> anaconda-patches mailing list
> anaconda-patches at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
> 

Just removing the parameter doesn't change anything, because it was being
ignored anyway.

But, at a point in the past, for the mountFilesystems() method,
a similar flag was disregarded in favor of a filewide errorHandler object.
If running as part of the installer, the ErrorHandler object is overwritten
by the one in pyanaconda.errors.
The history is actually more complicated than that, but that was the
upshot. The error handler decides how to treat the exception based on the
exception object, not on the context on which it was called, of course.

I'm assuming here, that the umountFilesystems() method ought to work similarly.
Right now, the errorHandler object is not used in the method, so any errors
raised will be propagated. But that can be changed, as you suggest.

Yep, thanks, won't forget.

- mulhern


More information about the anaconda-patches mailing list