Assertions in storage/mutable.py provide assurance that the struct library performs correct size transforms #1520

Closed
opened 2011-09-01 08:53:29 +00:00 by zancas · 2 comments

The assert statements at the top of this module are intended to provide assurance that the correct size is indicated by the arguments to the various struct methods used by the mutable file. A syntax error was preventing the intended function of these asserts.
The attached patch corrects that syntax and provides the desired assurance.

In particular the relevant '>' format character is inserted in the assertion, and the statement is converted into a comparison with '=='.

> The assert statements at the top of this module are intended to provide assurance that the correct size is indicated by the arguments to the various struct methods used by the mutable file. A syntax error was preventing the intended function of these asserts. > The attached patch corrects that syntax and provides the desired assurance. In particular the relevant '>' format character is inserted in the assertion, and the statement is converted into a comparison with '=='.
zancas added the
unknown
major
defect
1.9.0a1
labels 2011-09-01 08:53:29 +00:00
zancas added this to the undecided milestone 2011-09-01 08:53:29 +00:00
Author

Attachment fixedmutableasserts.darcs.patch (8524 bytes) added

**Attachment** fixedmutableasserts.darcs.patch (8524 bytes) added

looks good! landed in changeset:d2e5de3b6913082f, with some additional improvements (emit the failing size) in changeset:01b5124d0af5e6fe. thanks!

looks good! landed in changeset:d2e5de3b6913082f, with some additional improvements (emit the failing size) in changeset:01b5124d0af5e6fe. thanks!
warner added
code-storage
fixed
and removed
unknown
labels 2011-09-01 16:07:59 +00:00
warner modified the milestone from undecided to 1.9.0 2011-09-01 16:07:59 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
2 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#1520
No description provided.