diff options
author | Martin Panter <vadmium+py@gmail.com> | 2016-10-22 01:28:21 (GMT) |
---|---|---|
committer | Martin Panter <vadmium+py@gmail.com> | 2016-10-22 01:28:21 (GMT) |
commit | d60ea5ff009e7e48be78c388f642cd64287655f7 (patch) | |
tree | f8ef370f6c48d7547734ba5126d51c7adbf02eae /Python/thread.c | |
parent | 3b557991d4a7626cf12baf2277bc87acbc439744 (diff) | |
download | cpython-d60ea5ff009e7e48be78c388f642cd64287655f7.zip cpython-d60ea5ff009e7e48be78c388f642cd64287655f7.tar.gz cpython-d60ea5ff009e7e48be78c388f642cd64287655f7.tar.bz2 |
Issue #26620: Fix ResourceWarning in test_urllib2_localnet
* Use context manager on urllib objects to ensure that they are closed on error
* Use self.addCleanup() to cleanup resources even if a test is interrupted
with CTRL+c
This backports a patch by Victor Stinner.
Diffstat (limited to 'Python/thread.c')
0 files changed, 0 insertions, 0 deletions