[patch] paramiko-1.6 compatibility fix

Robert Collins robertc at robertcollins.net
Thu May 18 01:53:37 BST 2006


+1

On Wed, 2006-05-17 at 11:44 -0500, John Arbash Meinel wrote:
> Marien Zwart wrote:
> > bzrlib.transport.sftp.SFTPServerWithoutSSH creates a
> > paramiko.SFTPServer with a FakeChannel as channel and calls
> > finish_subsystem on it. Starting with paramiko 1.6 this calls the
> > superclass finish_subsystem, which calls close() on the channel.
> > FakeChannel does not have a close() method, so that fails.
> > 
> > So far the only symptom of this I have found is a lot of "Exception
> > from within unit test server thread" warnings when running selftest
> > (it does not actually fail any tests).
> > 
> > The attached patch adds a noop close() method to FakeChannel, making
> > the tests quiet again.
> > 
> 
> +1 from me. Anyone else?
> 
> John
> =:->
> 
> > 
> > 
> > ------------------------------------------------------------------------
> > 
> > === modified file 'bzrlib/transport/sftp.py'
> > --- bzrlib/transport/sftp.py	
> > +++ bzrlib/transport/sftp.py	
> > @@ -1019,6 +1019,8 @@
> >                  return '1'
> >              def get_hexdump(self):
> >                  return False
> > +            def close(self):
> > +                pass
> >  
> >          server = paramiko.SFTPServer(FakeChannel(), 'sftp', StubServer(self), StubSFTPServer,
> >                                       root=self._root, home=self._server_homedir)
> > 
> 
> 
-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060518/3f94851f/attachment.pgp 


More information about the bazaar mailing list