MCPcopy Create free account
hub / github.com/dobin/SuperMega / Payload

Class Payload

model/payload.py:9–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7
8
9class Payload():
10 def __init__(self, filepath: FilePath):
11 self.payload_path: FilePath = filepath
12 self.payload_data: bytes = b""
13
14
15 def init(self) -> bool:
16 if not os.path.exists(self.payload_path):
17 logger.error("Payload file does not exist: {}".format(self.payload_path))
18 return False
19
20 with open(self.payload_path, 'rb') as f:
21 self.payload_data = f.read()
22
23 logger.info("-[ Payload: {} ({} bytes)".format(
24 self.payload_path, len(self.payload_data)))
25 return True
26

Callers 1

initMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected