MCPcopy
hub / github.com/PyMySQL/PyMySQL / __init__

Method __init__

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

Source from the content-addressed store, hash-verified

342 """
343
344 def __init__(self, from_packet):
345 if not from_packet.is_load_local_packet():
346 raise ValueError(
347 f"Cannot create '{self.__class__}' object from invalid packet type"
348 )
349
350 self.packet = from_packet
351 self.filename = self.packet.get_all_data()[1:]
352 if DEBUG:
353 print("filename=", self.filename)
354
355 def __getattr__(self, key):
356 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