Opened 10 years ago

Closed 9 years ago

#9133 closed (wontfix)

Add LockException to locks for completeness

Reported by: magneto Owned by: nobody
Component: File uploads/storage Version: master
Severity: Keywords: locks
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


in django/core/files/

All is well, except for the Specific Exception "Resource Unavailable" (IO Error #11) which usually means the file is already locked.

Rather then doing an

except IOError, err:
     if err[0] == 11:
         "Do something with Already Locked"

on can simply have a LockException in locks

Not sure if this was a design thought at the beginning, or just a little omission.

This follows from the version on

I'm not sure how to do this on windows, perhaps someone else knows?

Attachments (1)

lockexception.diff (1.0 KB) - added by magneto 10 years ago.
Lock Exception

Download all attachments as: .zip

Change History (4)

Changed 10 years ago by magneto

Attachment: lockexception.diff added

Lock Exception

comment:1 Changed 10 years ago by magneto

Has patch: set
milestone: post-1.0

comment:2 Changed 9 years ago by (none)

milestone: post-1.0

Milestone post-1.0 deleted

comment:3 Changed 9 years ago by Jacob

Resolution: wontfix
Status: newclosed

django.core.files.locks only exists for internal use, which means unless something else in django.core.files needs a change like this, we don't need to make it. Since this isn't needed by the core, there's no reason to make this change.

Note: See TracTickets for help on using tickets.
Back to Top