From 53271495f74bde7fde2329b7c5c938654a36b7dc Mon Sep 17 00:00:00 2001 From: jvoisin Date: Fri, 6 Jul 2018 00:42:09 +0200 Subject: Add support for .txt files --- libmat2/harmless.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'libmat2/harmless.py') diff --git a/libmat2/harmless.py b/libmat2/harmless.py index 2878571..9032caf 100644 --- a/libmat2/harmless.py +++ b/libmat2/harmless.py @@ -1,3 +1,4 @@ +import shutil from typing import Dict from . import abstract @@ -6,13 +7,9 @@ class HarmlessParser(abstract.AbstractParser): """ This is the parser for filetypes that do not contain metadata. """ mimetypes = {'text/plain', } - def __init__(self, filename: str) -> None: - super().__init__(filename) - self.filename = filename - self.output_filename = filename - def get_meta(self) -> Dict[str, str]: return dict() def remove_all(self) -> bool: + shutil.copy(self.filename, self.output_filename) return True -- cgit v1.3