From 74f2d50433a831787fe7ab791748c8efa854ada2 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Fri, 22 Jun 2018 21:16:55 +0200 Subject: Split the testsuite a bit and add more tests --- libmat2/audio.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'libmat2/audio.py') diff --git a/libmat2/audio.py b/libmat2/audio.py index 9b73031..a26f36f 100644 --- a/libmat2/audio.py +++ b/libmat2/audio.py @@ -6,6 +6,17 @@ from . import abstract class MutagenParser(abstract.AbstractParser): + def __init__(self, filename): + super().__init__(filename) + try: + mutagen.File(self.filename) + except mutagen.flac.MutagenError: + raise ValueError + except mutagen.mp3.MutagenError: + raise ValueError + except mutagen.ogg.MutagenError: + raise ValueError + def get_meta(self): f = mutagen.File(self.filename) if f.tags: -- cgit v1.3