~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/bzrdir.py

Merge loom thread.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2394
2394
    def probe_transport(klass, transport):
2395
2395
        """Return a RemoteBzrDirFormat object if it looks possible."""
2396
2396
        try:
2397
 
            medium = transport.get_smart_client()
 
2397
            medium = transport.get_smart_medium()
2398
2398
        except (NotImplementedError, AttributeError,
2399
 
                errors.TransportNotPossible):
 
2399
                errors.TransportNotPossible, errors.NoSmartMedium):
2400
2400
            # no smart server, so not a branch for this format type.
2401
2401
            raise errors.NotBranchError(path=transport.base)
2402
2402
        else:
2403
2403
            # Decline to open it if the server doesn't support our required
2404
2404
            # version (2) so that the VFS-based transport will do it.
2405
 
            server_version = medium.protocol_version()
 
2405
            try:
 
2406
                server_version = medium.protocol_version()
 
2407
            except errors.SmartProtocolError:
 
2408
                # Apparently there's no usable smart server there, even though
 
2409
                # the medium supports the smart protocol.
 
2410
                raise errors.NotBranchError(path=transport.base)
2406
2411
            if server_version != 2:
2407
2412
                raise errors.NotBranchError(path=transport.base)
2408
2413
            return klass()