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

Method _write_bytes

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

Source from the content-addressed store, hash-verified

835 return data
836
837 def _write_bytes(self, data):
838 if self._current_timeout != self._write_timeout:
839 self._sock.settimeout(self._write_timeout)
840 self._current_timeout = self._write_timeout
841 try:
842 self._sock.sendall(data)
843 except OSError as e:
844 self._force_close()
845 raise err.OperationalError(
846 CR.CR_SERVER_GONE_ERROR, f"MySQL server has gone away ({e!r})"
847 )
848
849 def _read_query_result(self, unbuffered=False):
850 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