[rhythmbox] artsearch: don't warn for GErrors enumerating files



commit 10d551ecaae1b3f0f68995d6557b188df9f21174
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Tue Sep 18 17:25:02 2012 +0200

    artsearch: don't warn for GErrors enumerating files
    
    Gio will return NOT_SUPPORTED trying to enumerate GStreamer URIs such as
    mms or rtsp, but the error is harmless.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=684301

 plugins/artsearch/local.py |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/plugins/artsearch/local.py b/plugins/artsearch/local.py
index 819fbaa..ce1e798 100644
--- a/plugins/artsearch/local.py
+++ b/plugins/artsearch/local.py
@@ -123,8 +123,9 @@ class LocalSearch:
 			enumfiles.next_files_async(ITEMS_PER_NOTIFICATION, GLib.PRIORITY_DEFAULT, None, self._enum_dir_cb, [])
 		except Exception, e:
 			print "okay, probably done: %s" % e
-			import sys
-			sys.excepthook(*sys.exc_info())
+			if not isinstance(e, GLib.GError):
+				import sys
+				sys.excepthook(*sys.exc_info())
 			self.callback(self.callback_args)
 
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]