summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
Diffstat (limited to 'django')
-rw-r--r--django/core/files/storage.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/django/core/files/storage.py b/django/core/files/storage.py
index a6498724eb..9a7d8793fc 100644
--- a/django/core/files/storage.py
+++ b/django/core/files/storage.py
@@ -240,9 +240,9 @@ class FileSystemStorage(Storage):
os.umask(old_umask)
else:
os.makedirs(directory)
- except FileNotFoundError:
+ except FileExistsError:
# There's a race between os.path.exists() and os.makedirs().
- # If os.makedirs() fails with FileNotFoundError, the directory
+ # If os.makedirs() fails with FileExistsError, the directory
# was created concurrently.
pass
if not os.path.isdir(directory):