[tahoe-lafs-trac-stream] [tahoe-lafs] #1517: don't use IndexError to signal lease not found

tahoe-lafs trac at tahoe-lafs.org
Tue Aug 30 04:15:06 PDT 2011


#1517: don't use IndexError to signal lease not found
----------------------------+-------------------------
 Reporter:  davidsarah      |          Owner:
     Type:  defect          |         Status:  new
 Priority:  minor           |      Milestone:  1.10.0
Component:  code-storage    |        Version:  1.9.0a1
 Keywords:  cleanup leases  |  Launchpad Bug:
----------------------------+-------------------------
 [source:src/allmydata/storage/immutable.py at 4564#L144 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.

-- 
Ticket URL: <http://tahoe-lafs.org/trac/tahoe-lafs/ticket/1517>
tahoe-lafs <http://tahoe-lafs.org>
secure decentralized storage


More information about the tahoe-lafs-trac-stream mailing list