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

Method __init__

pymysql/protocol.py:337–346  ·  view source on GitHub ↗
(self, from_packet)

Source from the content-addressed store, hash-verified

335 """
336
337 def __init__(self, from_packet):
338 if not from_packet.is_load_local_packet():
339 raise ValueError(
340 f"Cannot create '{self.__class__}' object from invalid packet type"
341 )
342
343 self.packet = from_packet
344 self.filename = self.packet.get_all_data()[1:]
345 if DEBUG:
346 print("filename=", self.filename)
347
348 def __getattr__(self, key):
349 return getattr(self.packet, key)

Callers

nothing calls this directly

Calls 2

is_load_local_packetMethod · 0.80
get_all_dataMethod · 0.80

Tested by

no test coverage detected