From 09e748fa4c1785ba8a21ccac13bb693555d6c57b Mon Sep 17 00:00:00 2001 From: jvoisin Date: Thu, 21 Jun 2018 23:02:41 +0200 Subject: Refactor how offices files are handled - xml files are no longer considered harmless - Factorization of the `remove_all` method for office files - Explicit whitelist are used - Blacklist are used to skip files completely - Non-blacklisted files are _still cleaned_ - Unsupported files are still triggering an error --- libmat2/harmless.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libmat2/harmless.py') diff --git a/libmat2/harmless.py b/libmat2/harmless.py index 54737a8..2878571 100644 --- a/libmat2/harmless.py +++ b/libmat2/harmless.py @@ -4,7 +4,7 @@ from . import abstract class HarmlessParser(abstract.AbstractParser): """ This is the parser for filetypes that do not contain metadata. """ - mimetypes = {'application/xml', 'text/plain', 'text/xml', 'application/rdf+xml'} + mimetypes = {'text/plain', } def __init__(self, filename: str) -> None: super().__init__(filename) -- cgit v1.3