[PATCH mock] bind-mount the /var/lib/rpm from the chroot into the root directory

Michael E Brown Michael_E_Brown at dell.com
Mon May 7 19:05:56 UTC 2007


On Mon, May 07, 2007 at 08:59:21PM +0200, Enrico Scholz wrote:
> Michael E Brown <Michael_E_Brown at dell.com> writes:
> 
> >> -            rpmmacros.close()
> >
> > You just removed the close() on the macros file. This was probably not
> > intended.
> 
> No; it was intended. As a C++ developer I trust into (C)Python's reference
> counting + stack unwinding. Most python developers are doing this too, or
> why are they not writing
> 
> | f = open("...")
> | try:
> |         ...
> | finally:
> |         f.close()

Actually... I believe that this is part of the motivation of the new
'with' keyword.

Also, when you use the automatic garbage collection, the file might not
be closed until much later. I have seen some discussion on this causing
problems, especially on alternative python interpreter
implementations... eg. Jython.

I would prefer that we keep the close().

Thanks,
Michael




More information about the Fedora-buildsys-list mailing list