Fixed some ResourceWarnings on Python 3
commit6461acde05a5ecbd608be3f4ec1fc0b91a2ad8e0
authorThomas Leonard <talex5@gmail.com>
Sun, 19 Aug 2012 11:41:26 +0000 (19 12:41 +0100)
committerThomas Leonard <talex5@gmail.com>
Sun, 19 Aug 2012 12:53:31 +0000 (19 13:53 +0100)
treeffe62a6e3db540cc8e03d3a7626280a6d2102712
parenta480a382e2d50bf59361d40590f3dc15c498b7be
Fixed some ResourceWarnings on Python 3

Ensure that all temporary files and sockets are closed promptly, without
relying on the GC to do it. This avoids ResourceWarnings.

Note that urllib fails to close sockets in some cases
(http://bugs.python.org/issue12133), so we cannot enable the warnings for all
tests yet.
tests/basetest.py
tests/testdownload.py
tests/teststore.py
zeroinstall/injector/_download_child.py
zeroinstall/injector/download.py
zeroinstall/injector/fetch.py
zeroinstall/injector/iface_cache.py
zeroinstall/zerostore/optimise.py