[POS-commit] r153 - Kiwi2/Kiwi2/Widgets

Evandro Vale Miquelito evandro at async.com.br
Mon Mar 21 11:38:04 BRT 2005


Author: evandro
Date: 2005-03-21 11:38:03 -0300 (Mon, 21 Mar 2005)
New Revision: 153

Modified:
   Kiwi2/Kiwi2/Widgets/List.py
Log:
A small fix for update_instance method. Now we verify if the instance even
exists in the list.


Modified: Kiwi2/Kiwi2/Widgets/List.py
===================================================================
--- Kiwi2/Kiwi2/Widgets/List.py	2005-03-21 14:20:48 UTC (rev 152)
+++ Kiwi2/Kiwi2/Widgets/List.py	2005-03-21 14:38:03 UTC (rev 153)
@@ -859,6 +859,9 @@
 
     def update_instance(self, new_instance):
         iter = self._get_iter_from_instance(new_instance)
+        if iter is None: 
+            msg = "The instance %s is not in the list so I can not update it"
+            raise ValueError, msg % new_instance
         self.model.row_changed(self.model.get_path(iter), iter)
         
     def set_column_visibility(self, column_index, visibility):



More information about the POS-commit mailing list