summaryrefslogtreecommitdiffstats
path: root/func/minion/modules/mount.py
diff options
context:
space:
mode:
authorJohn Eckersberg <jeckersb@redhat.com>2008-01-13 14:00:17 -0500
committerJohn Eckersberg <jeckersb@redhat.com>2008-01-13 14:00:17 -0500
commit71fb48d2be9eb87067494ed11451f2ca68a67ba0 (patch)
tree7a41a4a171677322338f42dd675808371bfbfad5 /func/minion/modules/mount.py
parent7fb08fcd547515e1b1764fcdae15c60d9ac81e2e (diff)
downloadthird_party-func-71fb48d2be9eb87067494ed11451f2ca68a67ba0.tar.gz
third_party-func-71fb48d2be9eb87067494ed11451f2ca68a67ba0.tar.xz
third_party-func-71fb48d2be9eb87067494ed11451f2ca68a67ba0.zip
add missing logic for createdir option in mount.mount
Diffstat (limited to 'func/minion/modules/mount.py')
-rw-r--r--func/minion/modules/mount.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/func/minion/modules/mount.py b/func/minion/modules/mount.py
index 02463e4..01e4eab 100644
--- a/func/minion/modules/mount.py
+++ b/func/minion/modules/mount.py
@@ -14,7 +14,7 @@
## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
##
-import sub_process, os.path
+import sub_process, os
from modules import func_module
@@ -53,6 +53,11 @@ class MountModule(func_module.FuncModule):
cmdline.append(options)
cmdline.append(device)
cmdline.append(dir)
+ if createdir:
+ try:
+ os.makedirs(dir)
+ except:
+ return False
cmd = sub_process.Popen(cmdline, executable="/bin/mount", stdout=sub_process.PIPE, shell=False)
if cmd.wait() == 0:
return True