[tahoe-lafs-trac-stream] [tahoe-lafs] #1968: always use assertutil for assertions
tahoe-lafs
trac at tahoe-lafs.org
Thu May 9 21:55:53 UTC 2013
#1968: always use assertutil for assertions
--------------------+---------------------------
Reporter: zooko | Owner:
Type: defect | Status: new
Priority: minor | Milestone: undecided
Component: code | Version: 1.10.0
Keywords: | Launchpad Bug:
--------------------+---------------------------
Debugging #1742, we have the following report from a customer:
{{{
File "/root/allmydata-tahoe-1.10.0/src/allmydata/mutable/retrieve.py",
line 299, in _setup_download
assert len(self.remaining_sharemap) >= k
exceptions.AssertionError:
}}}
It would be helpful if we had instead received this from the customer:
{{{
File "/root/allmydata-tahoe-1.10.0/src/allmydata/mutable/retrieve.py",
line 299, in _setup_download
_assert(len(self.remaining_sharemap) >= k,
lenr=len(self.remaining_sharemap), k=k)
File "/root/allmydata-tahoe-1.10.0/src/allmydata/util/assertutil.py",
line 24, in _assert
raise AssertionError, "".join(msgbuf)
AssertionError: lenr: 0 <type 'int'>, 'k': 1 <type 'int'>
}}}
Our wiki:CodingStandards doc says to use assertutil. To close this ticket,
find all uses of {{{assert}}} in our codebase and change them to
assertutil.
--
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/1968>
tahoe-lafs <https://tahoe-lafs.org>
secure decentralized storage
More information about the tahoe-lafs-trac-stream
mailing list