Rev 4710: Remove some assert statements. in http://bazaar.launchpad.net/~jameinel/bzr/2.1.0b1-small_btree_no_disk

John Arbash Meinel john at arbash-meinel.com
Tue Sep 22 03:18:33 BST 2009


At http://bazaar.launchpad.net/~jameinel/bzr/2.1.0b1-small_btree_no_disk

------------------------------------------------------------
revno: 4710
revision-id: john at arbash-meinel.com-20090922021824-j3en52uqoof7ym89
parent: john at arbash-meinel.com-20090921183604-p1g8svzkwklc9bsw
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 2.1.0b1-small_btree_no_disk
timestamp: Mon 2009-09-21 21:18:24 -0500
message:
  Remove some assert statements.
-------------- next part --------------
=== modified file 'bzrlib/btree_index.py'
--- a/bzrlib/btree_index.py	2009-09-21 18:36:04 +0000
+++ b/bzrlib/btree_index.py	2009-09-22 02:18:24 +0000
@@ -67,18 +67,14 @@
     def finish_node(self, pad=True):
         byte_lines, _, padding = self.writer.finish()
         if self.nodes == 0:
-            assert self.spool is None
             self.spool = cStringIO.StringIO()
             # padded note:
             self.spool.write("\x00" * _RESERVED_HEADER_BYTES)
         elif self.nodes == 1:
             # We got bigger than 1 node, switch to a temp file
-            assert self.spool is not None
             spool = tempfile.TemporaryFile(prefix='bzr-index-row-')
             spool.write(self.spool.getvalue())
             self.spool = spool
-        else:
-            assert self.spool is not None
         skipped_bytes = 0
         if not pad and padding:
             del byte_lines[-1]



More information about the bazaar-commits mailing list