Update the header and close the file object

pull/52/head
tuxxy 2017-09-14 14:10:13 -07:00
parent 343ced9631
commit b325b38180
1 changed files with 3 additions and 4 deletions

View File

@ -113,8 +113,7 @@ class EncryptedFile(object):
def close(self):
"""
Writes the header to the file_obj and closes it. Called after the user
is finished writing data to the file_obj.
Writes the header to the filesystem and closes the file_obj.
"""
header, header_length = self._encode_header()
self.file_obj.write(header + header_length)
self.header.update_header()
self.file_obj.close()