force env.store() to create the required folder structure for convenience

This commit is contained in:
Thomas Nagy 2011-10-16 08:30:10 +02:00
parent 43460d95e8
commit 38b0201ce5
1 changed files with 6 additions and 1 deletions

View File

@ -9,7 +9,7 @@ ConfigSet: a special dict
The values put in :py:class:`ConfigSet` must be lists
"""
import copy, re
import copy, re, os
from waflib import Logs, Utils
re_imp = re.compile('^(#)*?([^#=]*?)\ =\ (.*?)$', re.M)
@ -270,6 +270,11 @@ class ConfigSet(object):
:param filename: file to use
:type filename: string
"""
try:
os.makedirs(os.path.split(filename)[0])
except OSError:
pass
f = None
try:
f = open(filename, 'w')