don't use IndexError to signal lease not found #1517

Open
opened 2011-08-30 11:15:05 +00:00 by davidsarah · 0 comments
davidsarah commented 2011-08-30 11:15:05 +00:00
Owner

[renew_lease in storage/immutable.py]source:src/allmydata/storage/immutable.py@4564#L144 (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.

[renew_lease in storage/immutable.py]source:src/allmydata/storage/immutable.py@4564#L144 (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.
tahoe-lafs added the
code-storage
minor
defect
1.9.0a1
labels 2011-08-30 11:15:05 +00:00
tahoe-lafs added this to the soon milestone 2011-08-30 11:15:05 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Reference: tahoe-lafs/trac-2024-07-25#1517
No description provided.