From 466665b1e155f8f0871830375e1bdad3256e58ea Mon Sep 17 00:00:00 2001 From: Remy Date: Sun, 26 Jun 2011 09:09:53 -0700 Subject: [PATCH] Fixed logging issue when adding an artist with one result. --- webServer.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/webServer.py b/webServer.py index f67e6058..4be0a7f5 100644 --- a/webServer.py +++ b/webServer.py @@ -164,9 +164,9 @@ class Headphones: else: artistResults = ws.Query().getArtists(ws.ArtistFilter(string.replace(name, '&', '%38'), limit=8)) if len(artistResults) == 0: - logger.log("No results found for" + name) + logger.log(u"No results found for " + name) page.append('''No results!Go back''') - + return page elif len(artistResults) > 1: page.append('''Search returned multiple artists. Click the artist you want to add:

''') for result in artistResults: @@ -175,8 +175,8 @@ class Headphones: return page else: for result in artistResults: - logger.log(u"Found one artist matching your search term: " + result.artist, result.id) artist = result.artist + logger.log(u"Found one artist matching your search term: " + artist.name +" ("+ artist.id+")") raise cherrypy.HTTPRedirect("/addArtist?artistid=%s" % u.extractUuid(artist.id)) findArtist.exposed = True