Skip to content

Commit

Permalink
OSError in case pooling creates directories at the same time
Browse files Browse the repository at this point in the history
  • Loading branch information
palewire committed Apr 13, 2017
1 parent ce30bfb commit b966387
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bakery/management/commands/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,10 @@ def copyfile_and_gzip(self, source_path, target_dir):
"""
# And then where we want to copy it to.
if not os.path.exists(target_dir):
os.makedirs(target_dir)
try:
os.makedirs(target_dir)
except OSError:
pass

# determine the mimetype of the file
content_type = mimetypes.guess_type(source_path)[0]
Expand Down

0 comments on commit b966387

Please sign in to comment.