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:
----- Original Message -----
From: "Brian C. Lane" bcl@redhat.com To: anaconda-patches@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@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
Probably time to give the method a docstring.
Otherwise, ack.
- mulhern
On Wed, Jan 14, 2015 at 01:32:59PM -0500, Anne Mulhern wrote:
----- Original Message -----
From: "Brian C. Lane" bcl@redhat.com To: anaconda-patches@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@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.
anaconda-patches@lists.fedorahosted.org