~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_transport.py

  • Committer: John Arbash Meinel
  • Date: 2010-09-01 18:18:28 UTC
  • mto: This revision was merged to the branch mainline in revision 5405.
  • Revision ID: john@arbash-meinel.com-20100901181828-w4hkbqanre70x10g
Do it a different way by overriding the logging chosen

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
 
18
18
from cStringIO import StringIO
19
 
import logging
20
19
import os
21
20
import subprocess
22
21
import sys
911
910
        # override the interface (doesn't change self._vendor).
912
911
        # Note that this does encryption, so can be slow.
913
912
        from bzrlib.tests import stub_sftp
914
 
        para_logger = logging.getLogger('paramiko')
915
 
        orig_handlers = para_logger.handlers[:]
916
 
        def restore():
917
 
            para_logger.handlers[:] = orig_handlers
918
 
        self.addCleanup(restore)
919
 
        para_logger.handlers[:] = logging.getLogger('bzr').handlers[:]
920
 
        para_logger.setLevel(logging.DEBUG)
921
913
 
922
914
        # Start an SSH server
923
915
        self.command_executed = []