~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/__init__.py

  • Committer: Jelmer Vernooij
  • Date: 2010-05-30 16:26:11 UTC
  • mto: This revision was merged to the branch mainline in revision 5271.
  • Revision ID: jelmer@samba.org-20100530162611-4awllv8f2f5srjsk
Remove unused imports, lazily load kerberos python module.

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
""")
48
48
 
49
49
from bzrlib.symbol_versioning import (
50
 
        deprecated_method,
51
 
        deprecated_function,
52
50
        DEPRECATED_PARAMETER,
53
51
        )
54
52
from bzrlib.trace import (
1742
1740
register_lazy_transport('ftp://', 'bzrlib.transport.ftp', 'FtpTransport')
1743
1741
register_transport_proto('aftp://', help="Access using active FTP.")
1744
1742
register_lazy_transport('aftp://', 'bzrlib.transport.ftp', 'FtpTransport')
 
1743
register_transport_proto('gio+', help="Access using any GIO supported protocols.")
 
1744
register_lazy_transport('gio+', 'bzrlib.transport.gio_transport', 'GioTransport')
 
1745
 
 
1746
 
 
1747
# Default to trying GSSAPI authentication (if the kerberos module is
 
1748
# available)
1745
1749
register_transport_proto('ftp+gssapi://', register_netloc=True)
1746
1750
register_transport_proto('aftp+gssapi://', register_netloc=True)
1747
1751
register_transport_proto('ftp+nogssapi://', register_netloc=True)
1748
1752
register_transport_proto('aftp+nogssapi://', register_netloc=True)
1749
 
 
1750
 
register_transport_proto('gio+', help="Access using any GIO supported protocols.")
1751
 
register_lazy_transport('gio+', 'bzrlib.transport.gio_transport', 'GioTransport')
1752
 
 
1753
 
try:
1754
 
    import kerberos
1755
 
    kerberos_available = True
1756
 
except ImportError:
1757
 
    kerberos_available = False
1758
 
 
1759
 
if kerberos_available:
1760
 
    # Default to trying GSSAPI authentication (if the kerberos module is
1761
 
    # available)
1762
 
    register_lazy_transport('ftp+gssapi://', 'bzrlib.transport.ftp._gssapi',
1763
 
                            'GSSAPIFtpTransport')
1764
 
    register_lazy_transport('aftp+gssapi://', 'bzrlib.transport.ftp._gssapi',
1765
 
                            'GSSAPIFtpTransport')
1766
 
    register_lazy_transport('ftp://', 'bzrlib.transport.ftp._gssapi',
1767
 
                            'GSSAPIFtpTransport')
1768
 
    register_lazy_transport('aftp://', 'bzrlib.transport.ftp._gssapi',
1769
 
                            'GSSAPIFtpTransport')
1770
 
    register_lazy_transport('ftp+nogssapi://', 'bzrlib.transport.ftp',
1771
 
                            'FtpTransport')
1772
 
    register_lazy_transport('aftp+nogssapi://', 'bzrlib.transport.ftp',
1773
 
                            'FtpTransport')
 
1753
register_lazy_transport('ftp+gssapi://', 'bzrlib.transport.ftp._gssapi',
 
1754
                        'GSSAPIFtpTransport')
 
1755
register_lazy_transport('aftp+gssapi://', 'bzrlib.transport.ftp._gssapi',
 
1756
                        'GSSAPIFtpTransport')
 
1757
register_lazy_transport('ftp://', 'bzrlib.transport.ftp._gssapi',
 
1758
                        'GSSAPIFtpTransport')
 
1759
register_lazy_transport('aftp://', 'bzrlib.transport.ftp._gssapi',
 
1760
                        'GSSAPIFtpTransport')
 
1761
register_lazy_transport('ftp+nogssapi://', 'bzrlib.transport.ftp',
 
1762
                        'FtpTransport')
 
1763
register_lazy_transport('aftp+nogssapi://', 'bzrlib.transport.ftp',
 
1764
                        'FtpTransport')
1774
1765
 
1775
1766
register_transport_proto('memory://')
1776
1767
register_lazy_transport('memory://', 'bzrlib.transport.memory',