diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2012-02-07 01:09:41 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2012-02-07 02:45:36 +0100 |
commit | f2903e0c4f9fc3931415144e72b6b898c4fdbf49 (patch) | |
tree | 5caf49d7cfddfcb46dd601e717ed8471eba34c2d /source4/scripting/python/samba/upgradehelpers.py | |
parent | 8dca1a022242d69e6d35c10ddb796081a6b497a2 (diff) | |
download | samba-f2903e0c4f9fc3931415144e72b6b898c4fdbf49.tar.gz samba-f2903e0c4f9fc3931415144e72b6b898c4fdbf49.tar.xz samba-f2903e0c4f9fc3931415144e72b6b898c4fdbf49.zip |
provision: Make sure target directory is created early.
This is necessary when using the target directory to store temporary
files.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Tue Feb 7 02:45:37 CET 2012 on sn-devel-104
Diffstat (limited to 'source4/scripting/python/samba/upgradehelpers.py')
-rwxr-xr-x | source4/scripting/python/samba/upgradehelpers.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source4/scripting/python/samba/upgradehelpers.py b/source4/scripting/python/samba/upgradehelpers.py index 2c7191e707..a75ab75ada 100755 --- a/source4/scripting/python/samba/upgradehelpers.py +++ b/source4/scripting/python/samba/upgradehelpers.py @@ -202,6 +202,8 @@ def get_paths(param, targetdir=None, smbconf=None): :param smbconf: Path to the smb.conf file :return: A list with the path of important provision objects""" if targetdir is not None: + if not os.path.exists(targetdir): + os.mkdir(targetdir) etcdir = os.path.join(targetdir, "etc") if not os.path.exists(etcdir): os.makedirs(etcdir) |