There was an error while loading. Please reload this page.
1 parent ab2a3dd commit b0f77c4Copy full SHA for b0f77c4
1 file changed
Lib/test/test_ftplib.py
@@ -81,7 +81,7 @@ def handle_close(self):
81
# (behaviour witnessed with test_data_connection)
82
if not self.dtp_conn_closed:
83
self.baseclass.push('226 transfer complete')
84
- self.close()
+ self.shutdown()
85
self.dtp_conn_closed = True
86
87
def push(self, what):
@@ -95,6 +95,9 @@ def push(self, what):
95
def handle_error(self):
96
default_error_handler()
97
98
+ def shutdown(self):
99
+ self.close()
100
+
101
102
class DummyFTPHandler(asynchat.async_chat):
103
@@ -227,7 +230,7 @@ def cmd_type(self, arg):
227
230
228
231
def cmd_quit(self, arg):
229
232
self.push('221 quit ok')
233
234
235
def cmd_abor(self, arg):
236
self.push('226 abor ok')
@@ -314,7 +317,7 @@ def handle_accepted(self, conn, addr):
314
317
self.handler_instance = self.handler(conn, encoding=self.encoding)
315
318
316
319
def handle_connect(self):
320
321
handle_read = handle_connect
322
323
def writable(self):
@@ -426,12 +429,12 @@ def recv(self, buffer_size):
426
429
427
430
428
431
- def close(self):
432
433
if (isinstance(self.socket, ssl.SSLSocket) and
434
self.socket._sslobj is not None):
435
self._do_ssl_shutdown()
436
else:
- super(SSLConnection, self).close()
437
438
439
440
class DummyTLS_DTPHandler(SSLConnection, DummyDTPHandler):
0 commit comments