We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6e97a96 commit e37d455Copy full SHA for e37d455
Lib/test/test_socket.py
@@ -5356,6 +5356,7 @@ def test_create_connection_timeout(self):
5356
5357
5358
class NetworkConnectionAttributesTest(SocketTCPTest, ThreadableTest):
5359
+ cli = None
5360
5361
def __init__(self, methodName='runTest'):
5362
SocketTCPTest.__init__(self, methodName=methodName)
@@ -5365,7 +5366,8 @@ def clientSetUp(self):
5365
5366
self.source_port = socket_helper.find_unused_port()
5367
5368
def clientTearDown(self):
- self.cli.close()
5369
+ if self.cli is not None:
5370
+ self.cli.close()
5371
self.cli = None
5372
ThreadableTest.clientTearDown(self)
5373
0 commit comments