diff options
author | Adrian Sampson <adrian@radbox.org> | 2013-02-16 16:39:21 -0800 |
---|---|---|
committer | Adrian Sampson <adrian@radbox.org> | 2013-02-16 16:39:21 -0800 |
commit | 0c487f479a5154d416117ada7939216ffd662d30 (patch) | |
tree | 166124eb77c248ac48ac634bb2940fdc13c4f3eb | |
parent | fc109e3a3d37d265878fd2343579dfa3d3d05d0d (diff) |
remove AutotagError dead codev1.1.0-beta.2
Another silly mistake identified by the RIT testing team.
-rw-r--r-- | beets/autotag/__init__.py | 1 | ||||
-rw-r--r-- | beets/autotag/match.py | 5 | ||||
-rw-r--r-- | beets/importer.py | 8 | ||||
-rw-r--r-- | beets/ui/commands.py | 17 |
4 files changed, 9 insertions, 22 deletions
diff --git a/beets/autotag/__init__.py b/beets/autotag/__init__.py index 3e2290104..6915a7783 100644 --- a/beets/autotag/__init__.py +++ b/beets/autotag/__init__.py @@ -23,7 +23,6 @@ from beets.util import sorted_walk, ancestry, displayable_path # Parts of external interface. from .hooks import AlbumInfo, TrackInfo, AlbumMatch, TrackMatch -from .match import AutotagError from .match import tag_item, tag_album from .match import recommendation diff --git a/beets/autotag/match.py b/beets/autotag/match.py index 38b5bb51b..85d64c319 100644 --- a/beets/autotag/match.py +++ b/beets/autotag/match.py @@ -81,10 +81,6 @@ recommendation = enum('none', 'low', 'medium', 'strong', name='recommendation') # differing artists. VA_ARTISTS = (u'', u'various artists', u'va', u'unknown') -# Autotagging exceptions. -class AutotagError(Exception): - pass - # Global logger. log = logging.getLogger('beets') @@ -418,7 +414,6 @@ def tag_album(items, search_artist=None, search_album=None, - A recommendation. If search_artist and search_album or search_id are provided, then they are used as search terms in place of the current metadata. - May raise an AutotagError if existing metadata is insufficient. """ # Get current metadata. cur_artist, cur_album, artist_consensus = current_metadata(items) diff --git a/beets/importer.py b/beets/importer.py index 2e1c3b94f..a6ff10fbc 100644 --- a/beets/importer.py +++ b/beets/importer.py @@ -633,11 +633,9 @@ def initial_lookup(session): plugins.send('import_task_start', session=session, task=task) log.debug('Looking up: %s' % displayable_path(task.paths)) - try: - task.set_candidates(*autotag.tag_album(task.items, - config['import']['timid'])) - except autotag.AutotagError: - task.set_null_candidates() + task.set_candidates( + *autotag.tag_album(task.items, config['import']['timid'].get(bool)) + ) def user_query(session): """A coroutine for interfacing with the user about the tagging diff --git a/beets/ui/commands.py b/beets/ui/commands.py index ccc43b519..b50341532 100644 --- a/beets/ui/commands.py +++ b/beets/ui/commands.py @@ -539,21 +539,16 @@ class TerminalImportSession(importer.ImportSession): elif choice is importer.action.MANUAL: # Try again with manual search terms. search_artist, search_album = manual_search(False) - try: - _, _, candidates, rec = \ - autotag.tag_album(task.items, search_artist, - search_album) - except autotag.AutotagError: - candidates, rec = None, None + _, _, candidates, rec = autotag.tag_album( + task.items, search_artist, search_album + ) elif choice is importer.action.MANUAL_ID: # Try a manually-entered ID. search_id = manual_id(False) if search_id: - try: - _, _, candidates, rec = \ - autotag.tag_album(task.items, search_id=search_id) - except autotag.AutotagError: - candidates, rec = None, None + _, _, candidates, rec = autotag.tag_album( + task.items, search_id=search_id + ) else: # We have a candidate! Finish tagging. Here, choice is an # AlbumMatch object. |