From 0b4bfcfc8851b5497403b86e1eb9d47135ac69b1 Mon Sep 17 00:00:00 2001 From: Philipp Wolfer Date: Fri, 5 Jun 2020 16:11:32 +0200 Subject: [PATCH] Fix exception handling when loading unsupported files --- picard/file.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/picard/file.py b/picard/file.py index a9dae17e8..bb67df1f4 100644 --- a/picard/file.py +++ b/picard/file.py @@ -175,7 +175,7 @@ class File(QtCore.QObject, Item): from picard.formats.util import guess_format # If it fails, force format guessing and try loading again file_format = guess_format(filename) - if not file_format and type(file_format) == type(self): + if not file_format or type(file_format) == type(self): raise return file_format._load(filename)