Add LockException to locks for completeness
|Reported by:||magneto||Owned by:||nobody|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
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 == 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?
Change History (4)
Changed 5 years ago by magneto
comment:1 Changed 5 years ago by magneto
- Has patch set
- milestone set to post-1.0
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset