Add _write_header method

pull/52/head
tuxxy 2017-09-14 12:12:22 -07:00
parent 4ee4a20a74
commit 73e037288d
1 changed files with 7 additions and 0 deletions

View File

@ -49,3 +49,10 @@ class Header(object):
'chunk_size': chunk_size,
'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