Fixed release_dict referenced before assignment bug on manual search

This commit is contained in:
Remy
2011-08-21 14:53:10 -07:00
parent 2783c6be26
commit ff432a19e2

View File

@@ -36,13 +36,13 @@ def verify(albumid, albumpath):
#TODO: This should be a call to a class method.. copied it out of importer with only minor changes
#TODO: odd things can happen when there are diacritic characters in the folder name, need to translate them?
import mb
release_dict = None
try:
release_dict = mb.getReleaseGroup(albumid)
except Exception, e:
logger.info('Unable to get release information for manual album with rgid: ' + albumid)
if not release_dict:
logger.warn('Unable to get release information for manual album with rgid: ' + albumid)
logger.info('Unable to get release information for manual album with rgid: %s. Error: %s' % (albumid, e))
return
logger.info(u"Now adding/updating artist: " + release_dict['artist_name'])