From 22836be22eaa8e9be077308aa839d83357c83653 Mon Sep 17 00:00:00 2001 From: Adrian Sampson Date: Sun, 12 Aug 2012 22:37:10 -0700 Subject: [PATCH] fix search/DB server disagreement crash (GC-418) --- beets/autotag/mb.py | 4 ++-- docs/changelog.rst | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/beets/autotag/mb.py b/beets/autotag/mb.py index 6dbaefdaf..5734fbc56 100644 --- a/beets/autotag/mb.py +++ b/beets/autotag/mb.py @@ -242,8 +242,8 @@ def match_album(artist, album, tracks=None, limit=SEARCH_LIMIT): # The search result is missing some data (namely, the tracks), # so we just use the ID and fetch the rest of the information. albuminfo = album_for_id(release['id']) - assert albuminfo is not None - yield albuminfo + if albuminfo is not None: + yield albuminfo def match_track(artist, title, limit=SEARCH_LIMIT): """Searches for a single track and returns an iterable of TrackInfo diff --git a/docs/changelog.rst b/docs/changelog.rst index 313645800..8faae60a6 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -7,6 +7,8 @@ Changelog * :doc:`/plugins/fetchart`: Fix a bug where cover art filenames could lack a ``.jpg`` extension. * Add the track mapping dictionary to the ``album_distance`` plugin function. +* Fix an assertion failure when the MusicBrainz main database and search server + disagree. 1.0b15 (July 26, 2012) ----------------------