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



Author: sebp
Date: Wed Feb 27 15:14:15 2008
New Revision: 1966
URL: http://svn.gnome.org/viewvc/deskbar-applet?rev=1966&view=rev

Log:
Provided better fix for 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	Wed Feb 27 15:14:15 2008
@@ -118,15 +118,15 @@
         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:
+            LOGGER.error("Match %r has no actions" % match_obj)
+            return
+        
         if not self.__match_hashes.has_key(match_obj.get_hash()): 
             iter = self.__append ( query_string, match_obj )
             self.__add_to_hash_iter_map(match_obj.get_hash(), iter)



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