MCPcopy
hub / github.com/HelloZeroNet/ZeroNet / frombytes

Method frombytes

plugins/Bigfile/BigfilePiecefield.py:69–72  ·  view source on GitHub ↗
(self, s)

Source from the content-addressed store, hash-verified

67 self.data = b""
68
69 def frombytes(self, s):
70 if not isinstance(s, bytes) and not isinstance(s, bytearray):
71 raise Exception("Invalid type: %s" % type(s))
72 self.data = s
73
74 def tobytes(self):
75 return self.data

Callers 7

loadContentsMethod · 0.45
replaceFromBytesMethod · 0.45
hashFileMethod · 0.45
checkBigfileMethod · 0.45
addTaskMethod · 0.45
testPiecefieldMethod · 0.45

Calls

no outgoing calls

Tested by 1

testPiecefieldMethod · 0.36