cce5de82e5
Fedora defines the 'text/xml' mime type for xml files. Adds this mime type to the harmless parser. Fixes #36. Signed-off-by: Antoine Tenart <antoine.tenart@ack.tf>
19 lines
532 B
Python
19 lines
532 B
Python
from typing import Dict
|
|
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'}
|
|
|
|
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:
|
|
return True
|