~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-02-09 17:10:05 UTC
  • mfrom: (5651.2.2 dump-btree-traceback)
  • Revision ID: pqm@pqm.ubuntu.com-20110209171005-2kb2a57fn3djkfv6
(vila) Fix a traceback attempting to "bzr dump-btree --raw" a btree file
 that's well formed, but has no data rows. (Eric Siegerman)

Show diffs side-by-side

added added

removed removed

Lines of Context:
413
413
                self.outf.write(page_bytes[:header_end])
414
414
                page_bytes = data
415
415
            self.outf.write('\nPage %d\n' % (page_idx,))
416
 
            decomp_bytes = zlib.decompress(page_bytes)
417
 
            self.outf.write(decomp_bytes)
418
 
            self.outf.write('\n')
 
416
            if len(page_bytes) == 0:
 
417
                self.outf.write('(empty)\n');
 
418
            else:
 
419
                decomp_bytes = zlib.decompress(page_bytes)
 
420
                self.outf.write(decomp_bytes)
 
421
                self.outf.write('\n')
419
422
 
420
423
    def _dump_entries(self, trans, basename):
421
424
        try: