[https://github.com/django/django/pull/6652 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/26691>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"359be1c8702ede41e7fe823ed13350795ba96a61" 359be1c8]:
{{{
#!CommitTicketReference repository=""
revision="359be1c8702ede41e7fe823ed13350795ba96a61"
Fixed #26691 -- Removed checking for a file's existence before deleting.
File operations always raise a ENOENT error when a file doesn't exist.
Checking the file exists before the operation adds a race condition
condition where the file could be removed between operations. As the
operation already raises an error on a missing file, avoid this race and
avoid checking the file exists twice. Instead only check a file exists
by catching the ENOENT error.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/26691#comment:1>