Merge pull request #1550 from phw/fix-load-file-exception-handling

Fix exception handling when loading unsupported files
This commit is contained in:
Wieland Hoffmann
2020-06-05 16:56:56 +02:00
committed by GitHub

View File

@@ -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)