Fixed issue 2 - added close method to OleFileIO class

This commit is contained in:
decalage 2012-02-16 22:50:13 +01:00 committed by Martin Panter
parent bd833a6972
commit eaeb12f695

View File

@ -108,6 +108,7 @@ __version__ = '0.22'
# 2010-01-22 v0.21 PL: - added support for big-endian CPUs such as PowerPC Macs
# 2012-02-16 v0.22 PL: - fixed bug in getproperties, patch by chuckleberryfinn
# (https://bitbucket.org/decalage/olefileio_pl/issue/7)
# - added close method to OleFileIO (fixed issue #2)
#-----------------------------------------------------------------------------
# TODO (for version 1.0):
@ -1004,6 +1005,13 @@ class OleFileIO:
self.minifatsect = self.MiniFatStart #i32(header, 60)
def close(self):
"""
close the OLE file, to release the file object
"""
self.fp.close()
def _check_duplicate_stream(self, first_sect, minifat=False):
"""
Checks if a stream has not been already referenced elsewhere.