[blivet-rhel7/master] get_loop_name shoud return an empty name if it isn't found (#980510)
Anne Mulhern
amulhern at redhat.com
Wed Jan 14 18:32:59 UTC 2015
----- Original Message -----
> From: "Brian C. Lane" <bcl at redhat.com>
> To: anaconda-patches at lists.fedorahosted.org
> Sent: Wednesday, January 14, 2015 1:20:25 PM
> Subject: [blivet-rhel7/master] get_loop_name shoud return an empty name if it isn't found (#980510)
^shoud^should
>
> Callers expect a name or "" not an error.
>
> Related: rhbz#980510
> ---
> blivet/devicelibs/loop.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/blivet/devicelibs/loop.py b/blivet/devicelibs/loop.py
> index 661a32e..4270929 100644
> --- a/blivet/devicelibs/loop.py
> +++ b/blivet/devicelibs/loop.py
> @@ -57,7 +57,7 @@ def get_loop_name(path):
>
> entries = buf.splitlines()
> if not entries:
> - raise LoopError("No loop associated with %s" % (path))
> + return ""
>
> first_entry = entries[0]
> if len(entries) > 1:
> --
> 1.9.3
>
> _______________________________________________
> anaconda-patches mailing list
> anaconda-patches at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
>
Probably time to give the method a docstring.
Otherwise, ack.
- mulhern
More information about the anaconda-patches
mailing list