[blivet-rhel7/master] get_loop_name shoud return an empty name if it isn't found (#980510)

Brian C. Lane bcl at redhat.com
Wed Jan 14 19:08:02 UTC 2015


On Wed, Jan 14, 2015 at 01:32:59PM -0500, Anne Mulhern wrote:
> ----- 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.

Yeah, all of loop.py could use some docs. I'll do that on master.

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


More information about the anaconda-patches mailing list