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

bcl installerbot-noreply at redhat.com
Thu May 28 23:36:20 UTC 2015


From: "Brian C. Lane" <bcl at redhat.com>

Callers expect a name or "" not an error.

Related: rhbz#980510
(cherry picked from commit 7ad7b1f09961811aae8dad08c29a6b3601354b33)
---
 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:


-- 
To view this commit on github, visit https://github.com/rhinstaller/blivet/commit/413519953ee82dd79f99aeda1d216c3b62d0a7af


More information about the anaconda-patches mailing list