We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4cfa247 commit d686848Copy full SHA for d686848
1 file changed
Lib/ftplib.py
@@ -589,11 +589,11 @@ def quit(self):
589
590
def close(self):
591
'''Close the connection without assuming anything about it.'''
592
- if self.file:
+ if self.file is not None:
593
self.file.close()
594
+ if self.sock is not None:
595
self.sock.close()
- self.file = self.sock = None
596
-
+ self.file = self.sock = None
597
598
try:
599
import ssl
0 commit comments