diff options
| author | Jon Dufresne <jon.dufresne@gmail.com> | 2019-01-28 07:01:35 -0800 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2019-01-28 11:15:06 -0500 |
| commit | 7785e03ba89aafbd949191f126361fb9103cb980 (patch) | |
| tree | 5776f7063604285445cfcebf6efb42fd5d063f60 /django/core/files/storage.py | |
| parent | 7444f3252757ed4384623e5afd7dcfeef3e0c74e (diff) | |
Fixed #30137 -- Replaced OSError aliases with the canonical OSError.
Used more specific errors (e.g. FileExistsError) as appropriate.
Diffstat (limited to 'django/core/files/storage.py')
| -rw-r--r-- | django/core/files/storage.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/core/files/storage.py b/django/core/files/storage.py index 9a7d8793fc..db0d311209 100644 --- a/django/core/files/storage.py +++ b/django/core/files/storage.py @@ -246,7 +246,7 @@ class FileSystemStorage(Storage): # was created concurrently. pass if not os.path.isdir(directory): - raise IOError("%s exists and is not a directory." % directory) + raise FileExistsError('%s exists and is not a directory.' % directory) # There's a potential race condition between get_available_name and # saving the file; it's possible that two threads might return the |
