Skip to content

Commit 732f017

Browse files
committed
Expand error message for FileTypeError (#2599)
...when Mutagen doesn't recognize the type at all.
1 parent d31a483 commit 732f017

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

beets/mediafile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ class FileTypeError(UnreadableFileError):
9696
"""
9797
def __init__(self, path, mutagen_type=None):
9898
if mutagen_type is None:
99-
msg = repr(path)
99+
msg = u'{0!r}: not in a recognized format'.format(path)
100100
else:
101101
msg = u'{0}: of mutagen type {1}'.format(repr(path), mutagen_type)
102102
Exception.__init__(self, msg)

docs/changelog.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ Fixes:
3535
non-ASCII filenames. Thanks to :user:`robot3498712`. :bug:`2592` :bug:`2593`
3636
* :doc:`/plugins/metasync`: Fix a crash in the Amarok backend when filenames
3737
contain quotes. Thanks to :user:`aranc23`. :bug:`2595` :bug:`2596`
38+
* More informative error messages are displayed when the file format is not
39+
recognized. :bug:`2599`
3840

3941

4042
1.4.4 (June 10, 2017)

0 commit comments

Comments
 (0)