MCPcopy Index your code
hub / github.com/python/cpython / is_client_connected

Method is_client_connected

Lib/test/test_ftplib.py:753–760  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

751 self.client.quit()
752
753 def is_client_connected():
754 if self.client.sock is None:
755 return False
756 try:
757 self.client.sendcmd('noop')
758 except (OSError, EOFError):
759 return False
760 return True
761
762 # base test
763 with ftplib.FTP(timeout=TIMEOUT) as self.client:

Callers

nothing calls this directly

Calls 1

sendcmdMethod · 0.80

Tested by

no test coverage detected