MCPcopy Create free account
hub / github.com/PyMySQL/PyMySQL / _write_bytes

Method _write_bytes

pymysql/connections.py:849–859  ·  view source on GitHub ↗
(self, data)

Source from the content-addressed store, hash-verified

847 return data
848
849 def _write_bytes(self, data):
850 if self._current_timeout != self._write_timeout:
851 self._sock.settimeout(self._write_timeout)
852 self._current_timeout = self._write_timeout
853 try:
854 self._sock.sendall(data)
855 except OSError as e:
856 self._force_close()
857 raise err.OperationalError(
858 CR.CR_SERVER_GONE_ERROR, f"MySQL server has gone away ({e!r})"
859 )
860
861 def _read_query_result(self, unbuffered=False):
862 self._result = None

Callers 3

closeMethod · 0.95
write_packetMethod · 0.95
_execute_commandMethod · 0.95

Calls 1

_force_closeMethod · 0.95

Tested by

no test coverage detected