# Bazaar revision bundle v0.7 # # message: # absorb a broken-pipe exception from paramiko when running the unit tests. it's okay for the client to vanish abruptly and paramiko really ought to mask the exception itself. # committer: Robey Pointer # date: Thu 2006-06-22 17:22:50.980175972 -0700 === modified file bzrlib/transport/sftp.py --- bzrlib/transport/sftp.py +++ bzrlib/transport/sftp.py @@ -23,6 +23,7 @@ import random import re import select +import socket import stat import subprocess import sys @@ -1030,7 +1031,15 @@ server = paramiko.SFTPServer(FakeChannel(), 'sftp', StubServer(self), StubSFTPServer, root=self._root, home=self._server_homedir) - server.start_subsystem('sftp', None, sock) + try: + server.start_subsystem('sftp', None, sock) + except socket.error, e: + if (len(e.args) > 0) and (e.args[0] == errno.EPIPE): + # it's okay for the client to disconnect abruptly + # (bug in paramiko 1.6: it should absorb this exception) + pass + else: + raise server.finish_subsystem() # revision id: robey@lag.net-20060623002250-96f2851c39181c4d # sha1: 2a8995629b9609c37b306bff4578e534d180aec4 # inventory sha1: af1faca532cb88c4cd798a37050ddb05e5c8ea75 # parent ids: # pqm@pqm.ubuntu.com-20060622200147-08093baa0cf46599 # base id: pqm@pqm.ubuntu.com-20060622200147-08093baa0cf46599 # properties: # branch-nick: bzr.dev.one-shot