[master 3/4] Check to see if mountpoint is already mounted

bcl installerbot-noreply at redhat.com
Tue Apr 7 19:22:20 UTC 2015


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

Instead of using self.status which checks to see if anything is mounted,
not the specific mountpoint requested.
---
 blivet/formats/fs.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/blivet/formats/fs.py b/blivet/formats/fs.py
index e1b5bba..8142081 100644
--- a/blivet/formats/fs.py
+++ b/blivet/formats/fs.py
@@ -642,7 +642,8 @@ def mount(self, options="", chroot="/", mountpoint=None):
         if not mountpoint:
             raise FSError("no mountpoint given")
 
-        if self.status:
+        # Is something is already mounted at this path?
+        if mountsCache.isMounted(mountpoint):
             return
 
         if not isinstance(self, NoDevFS) and not os.path.exists(self.device):


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


More information about the anaconda-patches mailing list