mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 01:46:18 +03:00
Fixed issue 2 - added close method to OleFileIO class
This commit is contained in:
parent
bd833a6972
commit
eaeb12f695
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue
Block a user