~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/bzrdir.py

  • Committer: Michael Ellerman
  • Date: 2006-06-06 14:11:36 UTC
  • mto: (1711.2.63 jam-integration)
  • mto: This revision was merged to the branch mainline in revision 1792.
  • Revision ID: michael@ellerman.id.au-20060606141136-c4e0263d5662a197
Don't coallesce try blocks, it can lead to confusing exceptions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
941
941
        """Return the format registered for URL."""
942
942
        try:
943
943
            format_string = transport.get(".bzr/branch-format").read()
 
944
        except errors.NoSuchFile:
 
945
            raise errors.NotBranchError(path=transport.base)
 
946
 
 
947
        try:
944
948
            return klass._formats[format_string]
945
 
        except errors.NoSuchFile:
946
 
            raise errors.NotBranchError(path=transport.base)
947
949
        except KeyError:
948
950
            raise errors.UnknownFormatError(format_string)
949
951