deskbar-applet r1921 - in trunk: . deskbar/ui/cuemiac



Author: sebp
Date: Sat Feb  9 14:20:04 2008
New Revision: 1921
URL: http://svn.gnome.org/viewvc/deskbar-applet?rev=1921&view=rev

Log:
Fixed bug #510769: list index out of range in CuemiacModel

Modified:
   trunk/ChangeLog
   trunk/deskbar/ui/cuemiac/CuemiacModel.py

Modified: trunk/deskbar/ui/cuemiac/CuemiacModel.py
==============================================================================
--- trunk/deskbar/ui/cuemiac/CuemiacModel.py	(original)
+++ trunk/deskbar/ui/cuemiac/CuemiacModel.py	Sat Feb  9 14:20:04 2008
@@ -118,12 +118,14 @@
         match_obj.add_all_actions(actions)
     
     def __append_match(self, match_obj, query_string):
+        if len(match_obj.get_actions()) == 0:
+            LOGGER.error("Match %r has no actions" % match_obj)
+            return
+        
         for action in match_obj.get_actions():
             if not action.is_valid():
                 LOGGER.error("Action %r is not valid, removing it" % action)
                 match_obj.remove_action(action)
-            if len(match_obj.get_actions()) == 0:
-                return
 
         if not self.__match_hashes.has_key(match_obj.get_hash()): 
             iter = self.__append ( query_string, match_obj )



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