From 3f9d8704e55fdac12400e6d59d103bdfe0403fee Mon Sep 17 00:00:00 2001 From: Sambhav Kothari Date: Wed, 5 Apr 2017 23:14:24 +0530 Subject: [PATCH] Fix picard.format issues --- picard/formats/__init__.py | 2 +- picard/formats/mutagenext/tak.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/picard/formats/__init__.py b/picard/formats/__init__.py index d36ade58c..e8e410cff 100644 --- a/picard/formats/__init__.py +++ b/picard/formats/__init__.py @@ -82,7 +82,7 @@ def open_(filename): # None is returned if both the methods fail return None except Exception as error: - log.error("Error occured:\n{}".format(error.message)) + log.error("Error occured:\n{}".format(error)) return None diff --git a/picard/formats/mutagenext/tak.py b/picard/formats/mutagenext/tak.py index 7b4fd1426..e320a5658 100644 --- a/picard/formats/mutagenext/tak.py +++ b/picard/formats/mutagenext/tak.py @@ -47,7 +47,7 @@ class TAK(APEv2File): _mimes = ["audio/x-tak"] def score(filename, fileobj, header): - return header.startswith("tBaK") + filename.lower().endswith(".tak") + return header.startswith(b"tBaK") + filename.lower().endswith(".tak") score = staticmethod(score) Open = TAK