~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/ssh.py

  • Committer: Jelmer Vernooij
  • Date: 2012-02-20 12:19:29 UTC
  • mfrom: (6437.23.11 2.5)
  • mto: (6581.1.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 6582.
  • Revision ID: jelmer@samba.org-20120220121929-7ni2psvjoatm1yp4
Merge bzr/2.5.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 
18
18
"""Foundation SSH support for SFTP and smart server."""
19
19
 
 
20
from __future__ import absolute_import
 
21
 
20
22
import errno
21
23
import getpass
22
24
import logging
352
354
class SubprocessVendor(SSHVendor):
353
355
    """Abstract base class for vendors that use pipes to a subprocess."""
354
356
 
 
357
    # In general stderr should be inherited from the parent process so prompts
 
358
    # are visible on the terminal. This can be overriden to another file for
 
359
    # tests, but beware of using PIPE which may hang due to not being read.
 
360
    _stderr_target = None
 
361
 
355
362
    def _connect(self, argv):
356
363
        # Attempt to make a socketpair to use as stdin/stdout for the SSH
357
364
        # subprocess.  We prefer sockets to pipes because they support
368
375
        else:
369
376
            stdin = stdout = subproc_sock
370
377
        proc = subprocess.Popen(argv, stdin=stdin, stdout=stdout,
 
378
                                stderr=self._stderr_target,
371
379
                                **os_specific_subprocess_params())
372
380
        if subproc_sock is not None:
373
381
            subproc_sock.close()