Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'hotfix/0.5.1' into develop

  • Loading branch information...
commit 7ac92ba2eeb7aa26cbf3c91b46a2f98bcf7a7292 2 parents 948c3e5 + fe7d4e3
Luper Rouch flupke authored
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/fsfield/fields.py
8 src/fsfield/fields.py
View
@@ -112,7 +112,13 @@ def write_data(sender, instance, created, raw, using, **kwargs):
full_path = self.storage.path(path)
directory = op.dirname(full_path)
if not op.exists(directory):
- os.makedirs(directory)
+ try:
+ os.makedirs(directory)
+ except OSError, err:
+ # Another thread may have created the directory since
+ # the check
+ if err.errno == 17:
+ pass
fp = self.storage.open(path, "wb")
if fs_storage:
locks.lock(fp.file, locks.LOCK_EX)
Please sign in to comment.
Something went wrong with that request. Please try again.