summaryrefslogtreecommitdiffstats
path: root/src/utils
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/fs.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/utils/fs.py b/src/utils/fs.py
index 184b47a..766c09b 100644
--- a/src/utils/fs.py
+++ b/src/utils/fs.py
@@ -36,7 +36,11 @@ def mount_mkdir(source, target):
Return True if mount is sucessful or if target is already a mountpoint.
"""
if not os.path.exists(target):
- os.mkdir(target)
+ try:
+ os.mkdir(target)
+ except OSError as e:
+ logging.error(f'mkdir operation failed. Reported {e}')
+ return False
if not os.path.ismount(target):
return mount(source, target)