summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2017-09-13 13:43:58 (GMT)
committerGitHub <noreply@github.com>2017-09-13 13:43:58 (GMT)
commitb157ce1e58b03988ce4340a55d0b856125833cc5 (patch)
tree29eea84067b5c0256359ca07a06b6a16f427455d /Lib
parentd165e14e29b45a22450263722f5c2c386c3a748a (diff)
downloadcpython-b157ce1e58b03988ce4340a55d0b856125833cc5.zip
cpython-b157ce1e58b03988ce4340a55d0b856125833cc5.tar.gz
cpython-b157ce1e58b03988ce4340a55d0b856125833cc5.tar.bz2
bpo-31234: Fix dangling thread in test_ftplib (#3544)
Clear also self.server_thread attribute in TestTimeouts.tearDown().
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_ftplib.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_ftplib.py b/Lib/test/test_ftplib.py
index 372282b..5880a1e 100644
--- a/Lib/test/test_ftplib.py
+++ b/Lib/test/test_ftplib.py
@@ -988,6 +988,8 @@ class TestTimeouts(TestCase):
def tearDown(self):
ftplib.FTP.port = self.old_port
self.server_thread.join()
+ # Explicitly clear the attribute to prevent dangling thread
+ self.server_thread = None
def server(self):
# This method sets the evt 3 times: