[gnome-music/gnome-3-14] Lookup's start_new_thread should also be inside try-catch



commit 9cfbac02364bc73e3e106edee1843c5bbf26f455
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]