MCPcopy Index your code
hub / github.com/PyMySQL/PyMySQL / LoadLocalPacketWrapper

Class LoadLocalPacketWrapper

pymysql/protocol.py:337–356  ·  view source on GitHub ↗

Load Local Packet Wrapper. It uses an existing packet object, and wraps around it, exposing useful variables while still providing access to the original packet objects variables and methods.

Source from the content-addressed store, hash-verified

335
336
337class LoadLocalPacketWrapper:
338 """
339 Load Local Packet Wrapper. It uses an existing packet object, and wraps
340 around it, exposing useful variables while still providing access
341 to the original packet objects variables and methods.
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 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…