[PATCH] imgutils: fix umount retry handling

Brian C. Lane bcl at redhat.com
Wed Aug 22 01:03:57 UTC 2012


On Tue, Aug 21, 2012 at 02:34:56PM -0400, Will Woods wrote:
> On Mon, 2012-08-20 at 16:50 -0700, Brian C. Lane wrote:
> > From: "Brian C. Lane" <bcl at redhat.com>
> > 
> > When umount fails it doesn't throw an error, so retry when the rv is
> > non-zero instead.
> 
> Augh. No, it *used to* throw an error, but execWithRedirect doesn't, so
> switching imgutils.py from check_call/check_output to execWithRedirect
> broke all the error handling. Fun!
> 
> I'd suggest adding convenience 'check_log_call' functions like:
> 
> def check_log_call(command, argv, **kwargs):
>     rv = execWithCapture(command, argv, **kwargs)
>     if rv:
>         raise CalledProcessError(rv, [command]+argv)
>     return 0
> 
> and using those instead in imgutils.py.

I think it would be better to just modify execWith* to raise
CalledProcessError.

-- 
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 482 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/anaconda-patches/attachments/20120821/d5993220/attachment.sig>


More information about the anaconda-patches mailing list