~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/ssh.py

(gz) Remove bzrlib/util/elementtree/ package (Martin Packman)

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()