From 71fb48d2be9eb87067494ed11451f2ca68a67ba0 Mon Sep 17 00:00:00 2001 From: John Eckersberg Date: Sun, 13 Jan 2008 14:00:17 -0500 Subject: add missing logic for createdir option in mount.mount --- func/minion/modules/mount.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'func') 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 -- cgit