#9133: Add LockException to locks for completeness
----------------------------------+-----------------------------------------
 Reporter:  magneto               |       Owner:  nobody    
   Status:  new                   |   Milestone:            
Component:  File uploads/storage  |     Version:  SVN       
 Keywords:  locks                 |       Stage:  Unreviewed
Has_patch:  0                     |  
----------------------------------+-----------------------------------------
 in django/core/files/locks.py


 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"
     else:
         raise
 }}}
 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
 http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65203

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

-- 
Ticket URL: <http://code.djangoproject.com/ticket/9133>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to