Skip to content

Commit

Permalink
mkdir settings.TEMP_FILE_ROOT if it doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
glebkuznetsov committed Apr 15, 2014
1 parent c163561 commit 03b1165
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions genome_designer/scripts/import_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit 03b1165

Please sign in to comment.