current_options_file = os.path.join('build_options', 'current', build_dir)
if os.path.isfile(current_options_file):
sticky_opts.files.append(current_options_file)
+ else:
+ # if file doesn't exist, make sure at least the directory is there
+ # so we can create it later
+ opt_dir = os.path.dirname(current_options_file)
+ if not os.path.isdir(opt_dir):
+ os.mkdir(opt_dir)
if not sticky_opts.files:
print "%s: No options file found in build_options, using defaults." \
% build_dir