summaryrefslogtreecommitdiff
path: root/libmat2
diff options
context:
space:
mode:
Diffstat (limited to 'libmat2')
-rw-r--r--libmat2/abstract.py5
-rw-r--r--libmat2/audio.py2
2 files changed, 6 insertions, 1 deletions
diff --git a/libmat2/abstract.py b/libmat2/abstract.py
index c531fbd..adf384a 100644
--- a/libmat2/abstract.py
+++ b/libmat2/abstract.py
@@ -34,7 +34,10 @@ class AbstractParser(abc.ABC):
34 34
35 @abc.abstractmethod 35 @abc.abstractmethod
36 def get_meta(self) -> Dict[str, Union[str, Dict]]: 36 def get_meta(self) -> Dict[str, Union[str, Dict]]:
37 """Return all the metadata of the current file""" 37 """Return all the metadata of the current file
38
39 :raises RuntimeError: Raised if the cleaning process went wrong.
40 """
38 41
39 @abc.abstractmethod 42 @abc.abstractmethod
40 def remove_all(self) -> bool: 43 def remove_all(self) -> bool:
diff --git a/libmat2/audio.py b/libmat2/audio.py
index 4e447c5..2029d9c 100644
--- a/libmat2/audio.py
+++ b/libmat2/audio.py
@@ -82,6 +82,8 @@ class FLACParser(MutagenParser):
82 with open(fname, 'wb') as f: 82 with open(fname, 'wb') as f:
83 f.write(picture.data) 83 f.write(picture.data)
84 p, _ = parser_factory.get_parser(fname) # type: ignore 84 p, _ = parser_factory.get_parser(fname) # type: ignore
85 if p is None:
86 raise ValueError
85 p.sandbox = self.sandbox 87 p.sandbox = self.sandbox
86 # Mypy chokes on ternaries :/ 88 # Mypy chokes on ternaries :/
87 meta[name] = p.get_meta() if p else 'harmful data' # type: ignore 89 meta[name] = p.get_meta() if p else 'harmful data' # type: ignore