Fixed bug (#2933 at least) where an artist will null name errors when trying to remove from library as logger is trying to concat artist name (NoneType) with string

This commit is contained in:
pratstercs
2017-05-01 00:29:39 +01:00
parent bc0ce99adf
commit 54edacdfe7

View File

@@ -252,7 +252,10 @@ class WebInterface(object):
namecheck = myDB.select('SELECT ArtistName from artists where ArtistID=?', [ArtistID])
for name in namecheck:
artistname = name['ArtistName']
logger.info(u"Deleting all traces of artist: " + artistname)
try:
logger.info(u"Deleting all traces of artist: " + artistname)
except TypeError:
logger.info(u"Deleting all traces of artist: null")
myDB.action('DELETE from artists WHERE ArtistID=?', [ArtistID])
from headphones import cache