~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/http/_urllib.py

  • Committer: Vincent Ladeuil
  • Date: 2007-10-22 15:18:24 UTC
  • mto: (2961.1.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 2962.
  • Revision ID: v.ladeuil+lp@free.fr-20071022151824-eol757lk393ofc38
AuthenticationConfig can be queried for logins too (first step).

* bzrlib/transport/ssh.py:
(_paramiko_auth): Try to get a user from AuthenticationConfig.

* bzrlib/smtp_connection.py:
(SMTPConnection._authenticate): Try to get a user from
AuthenticationConfig.

* bzrlib/transport/ftp.py:
(FtpTransport._create_connection): Try to get a user from
AuthenticationConfig. Credentials are now (user, password) instead
of just password.

* bzrlib/tests/test_ftp_transport.py:
(TestFTPServerUI._add_authorized_user): Cleanup by refactoring.

* bzrlib/config.py:
(AuthenticationConfig.get_user): New method to get logins.

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
from bzrlib.transport.http._urllib2_wrappers import (
31
31
    Opener,
32
32
    Request,
33
 
    extract_authentication_uri,
34
 
    extract_credentials,
35
33
    )
36
34
 
37
35
 
61
59
        path = self._combine_paths(self._path, relative)
62
60
        # urllib2 will be confused if it find authentication
63
61
        # info (user, password) in the urls. So we handle them separatly.
 
62
 
 
63
        # rhaaaa ! confused where ? confused when ? --vila 20070922
64
64
        return self._unsplit_url(self._unqualified_scheme,
65
65
                                 None, None, self._host, self._port, path)
66
66