[gnome-music] Lookup's start_new_thread should also be inside	try-catch
- From: Vadim Rutkovsky <vrutkovsky src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [gnome-music] Lookup's start_new_thread should also be inside	try-catch
 
- Date: Fri,  3 Oct 2014 11:49:47 +0000 (UTC)
 
commit 8c308bc81e75abbd347767deb66b1f60ae5d1566
Author: Vadim Rutkovsky <vrutkovs redhat com>
Date:   Fri Oct 3 12:26:57 2014 +0200
    Lookup's start_new_thread should also be inside try-catch
 gnomemusic/albumArtCache.py |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gnomemusic/albumArtCache.py b/gnomemusic/albumArtCache.py
index 64b4bf2..cf51f82 100644
--- a/gnomemusic/albumArtCache.py
+++ b/gnomemusic/albumArtCache.py
@@ -145,7 +145,10 @@ class AlbumArtCache:
 
     @log
     def lookup(self, item, width, height, callback, itr, artist, album):
-        start_new_thread(self.lookup_worker, (item, width, height, callback, itr, artist, album))
+        try:
+            start_new_thread(self.lookup_worker, (item, width, height, callback, itr, artist, album))
+        except Exception as e:
+            logger.warn("Error: %s" % e)
 
     @log
     def lookup_worker(self, item, width, height, callback, itr, artist, album):
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]