[Yum-devel] [UG][PATCH] Make urlgrabber close its fds on exception

Mark McLoughlin markmc at redhat.com
Thu Nov 29 10:49:06 UTC 2007


Hi,
	While running livecd-creator, if you hit ctrl-c while e.g. a repo's
metadata is being downloaded, then livecd-creator fails to clean up
after itself because it can't unmount the yum cache from the chroot.

	It turns out that urlgrabber is failing to close the fd it's writing to
at the time.

	The fix is simple - wrap the read/write loop in try/finally so as to
close the fd if an exception occurs.

Cheers,
Mark.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: urlgrabber-cleanup.patch
Type: text/x-patch
Size: 1554 bytes
Desc: not available
Url : http://lists.baseurl.org/pipermail/yum-devel/attachments/20071129/90b08c3d/attachment.bin 


More information about the Yum-devel mailing list