[master 2/3] Add isMounted to MountsCache
bcl
installerbot-noreply at redhat.com
Mon Apr 6 18:00:46 UTC 2015
From: "Brian C. Lane" <bcl at redhat.com>
Check to see if a mountpoint path is already mounted.
---
blivet/mounts.py | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/blivet/mounts.py b/blivet/mounts.py
index 069a970..a2cd208 100644
--- a/blivet/mounts.py
+++ b/blivet/mounts.py
@@ -50,6 +50,15 @@ def getMountpoint(self, devspec, subvolspec=None):
return self.mountpoints.get((devspec, subvolspec))
+ def isMounted(self, mountpoint):
+ """ Check to see if a path is already mounted
+
+ :param str mountpoint: Path to check for
+ """
+ self._cacheCheck()
+
+ return mountpoint in self.mountpoints.values()
+
def _getActiveMounts(self):
""" Get information about mounted devices from /proc/mounts and
/proc/self/mountinfo
--
To view this commit on github, visit https://github.com/rhinstaller/blivet/commit/5f3fb42be349614929670e570c181daeaa9c2999
More information about the anaconda-patches
mailing list