Commits

Adrian Sampson  committed f28ea9e

remove AutotagError dead code

Another silly mistake identified by the RIT testing team.

  • Participants
  • Parent commits 291b5dd
  • Tags v1.1.0-beta.2

Comments (0)

Files changed (4)

File beets/autotag/__init__.py

 
 # 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
 

File beets/autotag/match.py

 # differing artists.
 VA_ARTISTS = (u'', u'various artists', u'va', u'unknown')
 
-# Autotagging exceptions.
-class AutotagError(Exception):
-    pass
-
 # Global logger.
 log = logging.getLogger('beets')
 
         - 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)

File beets/importer.py

         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

File beets/ui/commands.py

             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.