1
0
mirror of synced 2024-06-01 11:58:04 +02:00

Increase audio processing robustness

This commit is contained in:
jvoisin 2021-12-19 22:33:28 +01:00
parent 143bb0a5f3
commit d555a02c90

View File

@ -27,8 +27,11 @@ class MutagenParser(abstract.AbstractParser):
def remove_all(self) -> bool: def remove_all(self) -> bool:
shutil.copy(self.filename, self.output_filename) shutil.copy(self.filename, self.output_filename)
f = mutagen.File(self.output_filename) f = mutagen.File(self.output_filename)
try:
f.delete() f.delete()
f.save() f.save()
except mutagen.MutagenError:
raise ValueError
return True return True