~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/sftp.py

  • Committer: John Arbash Meinel
  • Date: 2008-10-17 19:58:53 UTC
  • mfrom: (3783 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3785.
  • Revision ID: john@arbash-meinel.com-20081017195853-i31d3g7sur1prgvi
Merge bzr.dev 3783, resolve NEWS

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
import warnings
40
40
 
41
41
from bzrlib import (
 
42
    config,
42
43
    errors,
43
44
    urlutils,
44
45
    )
375
376
            password = credentials
376
377
 
377
378
        vendor = ssh._get_ssh_vendor()
 
379
        user = self._user
 
380
        if user is None:
 
381
            auth = config.AuthenticationConfig()
 
382
            user = auth.get_user('ssh', self._host, self._port)
378
383
        connection = vendor.connect_sftp(self._user, password,
379
384
                                         self._host, self._port)
380
 
        return connection, password
 
385
        return connection, (user, password)
381
386
 
382
387
    def _get_sftp(self):
383
388
        """Ensures that a connection is established"""