aboutsummaryrefslogtreecommitdiffstats
path: root/libmat2/archive.py
diff options
context:
space:
mode:
authorjvoisin <julien.voisin@dustri.org>2020-03-08 12:17:56 +0100
committerjvoisin <julien.voisin@dustri.org>2020-03-08 14:06:27 +0100
commitd7a03d907baac73dd69c0ce77f3610e7d4bad5f4 (patch)
tree1f4ac10ff3355a162047c08c3ec79ed04f1ecbc2 /libmat2/archive.py
parenta23dc001cd74866204c868ef1dbf7ef7ca99b5aa (diff)
downloadexternal_mat2-d7a03d907baac73dd69c0ce77f3610e7d4bad5f4.tar.gz
external_mat2-d7a03d907baac73dd69c0ce77f3610e7d4bad5f4.tar.bz2
external_mat2-d7a03d907baac73dd69c0ce77f3610e7d4bad5f4.zip
Vastly improve ppt compatibility
Diffstat (limited to 'libmat2/archive.py')
-rw-r--r--libmat2/archive.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/libmat2/archive.py b/libmat2/archive.py
index de80a35..f6db491 100644
--- a/libmat2/archive.py
+++ b/libmat2/archive.py
@@ -82,6 +82,13 @@ class ArchiveBasedAbstractParser(abstract.AbstractParser):
# pylint: disable=unused-argument,no-self-use
return {} # pragma: no cover
+ def _final_checks(self) -> bool:
+ """ This method is invoked after the file has been cleaned,
+ allowing to run final verifications.
+ """
+ # pylint: disable=unused-argument,no-self-use
+ return True
+
@staticmethod
@abc.abstractmethod
def _get_all_members(archive: ArchiveClass) -> List[ArchiveMember]:
@@ -223,6 +230,8 @@ class ArchiveBasedAbstractParser(abstract.AbstractParser):
if abort:
os.remove(self.output_filename)
return False
+ if not self._final_checks():
+ return False # pragma: no cover
return True