mirror of https://github.com/nucypher/nucypher.git
Add _write_header method
parent
4ee4a20a74
commit
73e037288d
|
@ -49,3 +49,10 @@ class Header(object):
|
||||||
'chunk_size': chunk_size,
|
'chunk_size': chunk_size,
|
||||||
'num_chunks': num_chunks,
|
'num_chunks': num_chunks,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def _write_header(self, header_path):
|
||||||
|
with open(header_path, mode='wb') as f:
|
||||||
|
try:
|
||||||
|
f.write(msgpack.dumps(self.header))
|
||||||
|
except ValueError as e:
|
||||||
|
raise e
|
||||||
|
|
Loading…
Reference in New Issue