gc.garbage from paramiko

Jan Hudec bulb at ucw.cz
Fri Feb 10 09:25:12 GMT 2006


On Fri, Feb 10, 2006 at 09:55:37 +0100, Jan Hudec wrote:
> On Thu, Feb 09, 2006 at 23:28:48 -0800, Robey Pointer wrote:
> > 
> > On 9 Feb 2006, at 7:47, Neil Schemenauer wrote:
> > 
> > >John A Meinel <john at arbash-meinel.com> wrote:
> > >>You could move the close() into the member variable. And then
> > >>main_obj.close() just calls the main_obj._secret_sauce.close().
> > 
> > But the problem is actually closing without having close() called  
> > explicitly.
> 
> Well, the __del__ method should be on the smallest object that is
> actually necessary to close anything on. 

I have just briefly looked at the code (development head) and indeed
some of the __del__ methods don't need to be there.

For example SFTP_Client.__del__ - it only calls self.sock.close(), but
self.sock.__del__ will do that as well and python will call that anyway.

-- 
						 Jan 'Bulb' Hudec <bulb at ucw.cz>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060210/8f1a8155/attachment.pgp 


More information about the bazaar mailing list