From 54edacdfe7e90116ceec932e2f585d4c1503a289 Mon Sep 17 00:00:00 2001 From: pratstercs Date: Mon, 1 May 2017 00:29:39 +0100 Subject: [PATCH] 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 --- headphones/webserve.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/headphones/webserve.py b/headphones/webserve.py index 267b78bc..a4063000 100644 --- a/headphones/webserve.py +++ b/headphones/webserve.py @@ -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