On Wed, Jul 27, 2011 at 02:21:59PM +0200, Antoine Pitrou wrote: > transient_internet doesn't silence ValueError at all.
Yes, that is correct. I missed recollecting it in the first place. I guess, I did not see using a content manager withing another context manager block as something nice.. (nothing wrong but just the indented code with additional wrap of exceptional handler). But yes, it would be better to wrap it with transient_internet call. Shall do. > Well, the test should simply call close() as is done in other tests. I tried that before responding, it does not silence the Resource Warning. The fix (at least for these cases where Connection:close header is not sent) lies in closing request in the urllib.request. It is tricky as the server is not sending a Connection:close header which httplib relies on to close the socket. -- Senthil _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com