diff options
Diffstat (limited to 'libmat2/archive.py')
| -rw-r--r-- | libmat2/archive.py | 9 |
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): | |||
| 82 | # pylint: disable=unused-argument,no-self-use | 82 | # pylint: disable=unused-argument,no-self-use |
| 83 | return {} # pragma: no cover | 83 | return {} # pragma: no cover |
| 84 | 84 | ||
| 85 | def _final_checks(self) -> bool: | ||
| 86 | """ This method is invoked after the file has been cleaned, | ||
| 87 | allowing to run final verifications. | ||
| 88 | """ | ||
| 89 | # pylint: disable=unused-argument,no-self-use | ||
| 90 | return True | ||
| 91 | |||
| 85 | @staticmethod | 92 | @staticmethod |
| 86 | @abc.abstractmethod | 93 | @abc.abstractmethod |
| 87 | def _get_all_members(archive: ArchiveClass) -> List[ArchiveMember]: | 94 | def _get_all_members(archive: ArchiveClass) -> List[ArchiveMember]: |
| @@ -223,6 +230,8 @@ class ArchiveBasedAbstractParser(abstract.AbstractParser): | |||
| 223 | if abort: | 230 | if abort: |
| 224 | os.remove(self.output_filename) | 231 | os.remove(self.output_filename) |
| 225 | return False | 232 | return False |
| 233 | if not self._final_checks(): | ||
| 234 | return False # pragma: no cover | ||
| 226 | return True | 235 | return True |
| 227 | 236 | ||
| 228 | 237 | ||
