From 03b11652a2aded7de0779917dfe53fb80c1e8ad5 Mon Sep 17 00:00:00 2001 From: Gleb Kuznetsov Date: Tue, 15 Apr 2014 22:59:24 +0000 Subject: [PATCH] mkdir settings.TEMP_FILE_ROOT if it doesn't exist --- genome_designer/scripts/import_util.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/genome_designer/scripts/import_util.py b/genome_designer/scripts/import_util.py index 5392c0ce..4e5d8a78 100644 --- a/genome_designer/scripts/import_util.py +++ b/genome_designer/scripts/import_util.py @@ -548,6 +548,8 @@ def parse_experiment_sample_targets_file(project, temp_file_location = targets_filehandle_or_filename else: # It's an open File object. + if not os.path.exists(settings.TEMP_FILE_ROOT): + os.mkdir(settings.TEMP_FILE_ROOT) _, temp_file_location = mkstemp(dir=settings.TEMP_FILE_ROOT) with open(temp_file_location, 'w') as temp_fh: temp_fh.write(targets_filehandle_or_filename.read())