Opened at 2011-08-30T11:15:05Z
#1517 new defect
don't use IndexError to signal lease not found
Reported by: | davidsarah | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | soon |
Component: | code-storage | Version: | 1.9.0a1 |
Keywords: | cleanup leases | Cc: | |
Launchpad Bug: |
Description
renew_lease in storage/immutable.py (and similarly in mutable.py) uses IndexError to signal that a lease is not present. It isn't a good idea to use an exception that is predefined by the Python runtime for an index-out-of-bounds error, since it might be raised as a result of a bug in the code being called.
Note: See
TracTickets for help on using
tickets.