[merge] remove uses of 'assert False' to raise an exception

Martin Pool mbp at sourcefrog.net
Wed Jun 27 05:37:38 BST 2007


There were some places in bzrlib where we said

  assert False, "something bad happened"

This is bad because assertions aren't run under python -O, and so the
interpreter would run on regardless of what was meant to be a fatal
problem.  Also in most cases there was a more useful exception we can
raise instead.

python -O is not very interesting or commonly used at the moment, but
I had a note to clean them up.

-- 
Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 20070627-assert-false.diff
Type: text/x-patch
Size: 3404 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20070627/568b63f7/attachment.bin 


More information about the bazaar mailing list