]> git.michaelhowe.org Git - packages/b/bup.git/commit
rewrite asserts to be side-effect free
authorJon Dowland <jmtd@debian.org>
Wed, 16 May 2012 14:41:23 +0000 (15:41 +0100)
committerJon Dowland <jmtd@debian.org>
Thu, 24 May 2012 17:04:38 +0000 (18:04 +0100)
commitd43cf2b3c134480cbaab0356d5dd4c7090cd33b2
tree10c86d658c981485d81a1a499604cf26860a2fd6
parent6cbf4f96ffbca6b9db602fc6340f15b3597ed1f9
rewrite asserts to be side-effect free

Two asserts changed program state, and so problems could occur if
the asserts are not executed (such as when PYTHONOPTIMIZE is fiddled
with). Move the side-effect code out of the assert and test only
previously calculated results.
lib/bup/git.py