[PATCH] imgutils: fix umount retry handling
Will Woods
wwoods at redhat.com
Tue Aug 21 18:34:56 UTC 2012
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.
-w
More information about the anaconda-patches
mailing list