deskbar-applet r2083 - in trunk: . deskbar/handlers



Author: sebp
Date: Tue Apr  8 18:11:33 2008
New Revision: 2083
URL: http://svn.gnome.org/viewvc/deskbar-applet?rev=2083&view=rev

Log:
Don't return when an error occured while sending query

Modified:
   trunk/ChangeLog
   trunk/deskbar/handlers/beagle-live.py

Modified: trunk/deskbar/handlers/beagle-live.py
==============================================================================
--- trunk/deskbar/handlers/beagle-live.py	(original)
+++ trunk/deskbar/handlers/beagle-live.py	Tue Apr  8 18:11:33 2008
@@ -348,7 +348,6 @@
                 self.beagle.send_request_async (self._beagle_query)
             except GError, e:
                 LOGGER.exception(e)
-                return
         finally:
             self.__beagle_lock.release()
                
@@ -360,8 +359,8 @@
                 continue
             
             snippet = None
-            if "snippet" in TYPES[hit.get_type()] and TYPES[hit.get_type()]["snippet"]:
-                snippet = self._get_snippet(query, hit)
+            #if "snippet" in TYPES[hit.get_type()] and TYPES[hit.get_type()]["snippet"]:
+            #    snippet = self._get_snippet(query, hit)
                 
             match = self._create_match(query, hit, qstring, snippet)
             if match != None:
@@ -397,10 +396,13 @@
                 response = self.beagle.send_request (snippet_request)
             except GError, e:
                 LOGGER.exception(e)
-                return None
+                response = None
         finally:
             self.__beagle_lock.release()
         
+        if response == None:
+            return None
+        
         snippet = response.get_snippet()
         # Older versions of beagle return None
         # if an error occured during snippet retrival 



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