summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/utils/fs.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/utils/fs.py b/src/utils/fs.py
index 7500ebd..191fb86 100644
--- a/src/utils/fs.py
+++ b/src/utils/fs.py
@@ -27,11 +27,17 @@ def find_mountpoint(path):
def mount_mkdir(source, target):
"""
Mounts and creates the mountpoint directory if it's not present.
+
+ Return True if mount is sucessful or if target is already a mountpoint.
"""
if not os.path.exists(target):
os.mkdir(target)
+
if not os.path.ismount(target):
return mount(source, target)
+ else:
+ return True
+
return False