/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/bundle/read_bundle.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-06-07 16:47:54 UTC
  • mfrom: (1185.82.142 w-changeset)
  • Revision ID: pqm@pqm.ubuntu.com-20060607164754-f5a93b47d5650c8c
Produce better errors for malformed bundles

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
import pprint
10
10
 
11
11
from bzrlib.errors import (TestamentMismatch, BzrError, 
12
 
                           MalformedHeader, MalformedPatches)
 
12
                           MalformedHeader, MalformedPatches, NotABundle)
13
13
from bzrlib.bundle.common import get_header, header_str
14
14
from bzrlib.inventory import (Inventory, InventoryEntry,
15
15
                              InventoryDirectory, InventoryFile,
360
360
                                ' a header, but did not match')
361
361
                    header.pop(0)
362
362
        else:
363
 
            raise MalformedHeader('Did not find an opening header')
 
363
            raise NotABundle('Did not find an opening header')
364
364
 
365
365
    def _read_revision_header(self):
366
366
        self.info.revisions.append(RevisionInfo(None))