Re: OSTree <3 Anaconda

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

 



On Wed, Mar 26, 2014 at 02:02:51AM +0000, Colin Walters wrote:
> On Fri, Mar 21, 2014 at 3:07 PM, Brian C. Lane <bcl@xxxxxxxxxx> wrote:
> >
> >> +    def _safeExecWithRedirect(self, cmd, argv, **kwargs):
> >> +        """Like iutil.execWithRedirect, but treat errors as
> >>fatal"""
> >> +        rc = iutil.execWithRedirect(cmd, argv, **kwargs)
> >> +        if rc != 0:
> >> +            exn = PayloadInstallError("%s %s exited with code
> >>%d" % (cmd, argv, rc))
> >> +            if errorHandler.cb(exn) == ERROR_RAISE:
> >> +                raise exn
> >
> >You may as well add this to iutil as another variation on ExecWith
> 
> I don't think I can throw a PayloadInstallError from iutil, which
> raises the question of which exception.  Maybe
> subprocess.CalledProcessError?
> 
> Do we need to duplicate the bits to invoke errorHandler in all of
> these subprocess calls?  Since all of these errors are fatal, it
> seems like a toplevel handler should catch them anyways.

Nevermind, it would be more awkward to try and move it into iutil.

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

_______________________________________________
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