All pastes #450106 Raw Edit

Someone

public text v1 · immutable
·published 2007-04-20 16:35 UTC
rendered paste body
Index: /home/heikki/workspace/chandler/tools/QATestScripts/Performance/PerfImportCalendar.py
===================================================================
--- /home/heikki/workspace/chandler/tools/QATestScripts/Performance/PerfImportCalendar.py	(revision 14033)
+++ /home/heikki/workspace/chandler/tools/QATestScripts/Performance/PerfImportCalendar.py	(working copy)
@@ -80,12 +80,11 @@
     with view.observersDeferred():
         with view.reindexingDeferred():
             contentItems = schema.ns("osaf.pim", view).contentItems
-            keys = [k for k in contentItems.iterkeys()]
+            keys = [k for k in contentItems.iterkeys() if view.findValue(k, '_sectionTriageStatus', None) is not None]
             for key in keys[1:]: # Leave one so we'll always have 3 sections in summary view
-                if view.findValue(key, '_sectionTriageStatus', None) is not None:
-                    item = view[key]
-                    del item._sectionTriageStatus
-                    del item._sectionTriageStatusChanged
+                item = view[key]
+                del item._sectionTriageStatus
+                del item._sectionTriageStatusChanged
 
     # backup
     # - need to commit first so that the collection in the sidebar