/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/transport/smart.py

  • Committer: Andrew Bennetts
  • Date: 2007-02-26 09:20:26 UTC
  • mto: This revision was merged to the branch mainline in revision 2301.
  • Revision ID: andrew.bennetts@canonical.com-20070226092026-d56e1sqtimfkd5zt
Give bzr:// a default port of 4155.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1731
1731
    def __init__(self, url):
1732
1732
        _scheme, _username, _password, _host, _port, _path = \
1733
1733
            transport.split_url(url)
1734
 
        try:
1735
 
            _port = int(_port)
1736
 
        except (ValueError, TypeError), e:
1737
 
            raise errors.InvalidURL(path=url, extra="invalid port %s" % _port)
 
1734
        if _port is None:
 
1735
            _port = 4155
 
1736
        else:
 
1737
            try:
 
1738
                _port = int(_port)
 
1739
            except (ValueError, TypeError), e:
 
1740
                raise errors.InvalidURL(
 
1741
                    path=url, extra="invalid port %s" % _port)
1738
1742
        medium = SmartTCPClientMedium(_host, _port)
1739
1743
        super(SmartTCPTransport, self).__init__(url, medium=medium)
1740
1744