diff --git a/libmat2/archive.py b/libmat2/archive.py index 205312b8863f95bfe5fdd98dd29af29c01450dff..3d70a9a4a717b35e9438ba6d35f536015d4e102a 100644 --- a/libmat2/archive.py +++ b/libmat2/archive.py @@ -49,7 +49,6 @@ class ArchiveBasedAbstractParser(abstract.AbstractParser): zipinfo.date_time = (1980, 1, 1, 0, 0, 0) # this is as early as a zipfile can be return zipinfo - @staticmethod def _get_zipinfo_meta(self, zipinfo: zipfile.ZipInfo) -> Dict[str, str]: metadata = {} if zipinfo.create_system == 3: # this is Linux @@ -146,7 +145,7 @@ class ZIPParser(ArchiveBasedAbstractParser): metadata = {} zipin = zipfile.ZipFile(self.filename) for item in zipin.infolist(): - for key, value in self._get_zipinfo_meta(self, item).items(): + for key, value in self._get_zipinfo_meta(item).items(): metadata[key] = value zipin.close() return metadata diff --git a/libmat2/office.py b/libmat2/office.py index 73d5d9ac95a0b870b397addaf80ac92f9d056389..32e7b7576a4f985b021410963860306b78820a55 100644 --- a/libmat2/office.py +++ b/libmat2/office.py @@ -312,7 +312,7 @@ class MSOfficeParser(ArchiveBasedAbstractParser): metadata[key] = value except (TypeError, UnicodeDecodeError): # We didn't manage to parse the xml file metadata[item.filename] = 'harmful content' - for key, value in self._get_zipinfo_meta(self, item).items(): + for key, value in self._get_zipinfo_meta(item).items(): metadata[key] = value zipin.close() return metadata @@ -397,7 +397,7 @@ class LibreOfficeParser(ArchiveBasedAbstractParser): metadata[key] = value except (TypeError, UnicodeDecodeError): # We didn't manage to parse the xml file metadata[item.filename] = 'harmful content' - for key, value in self._get_zipinfo_meta(self, item).items(): + for key, value in self._get_zipinfo_meta(item).items(): metadata[key] = value zipin.close() return metadata