[Checkins] SVN: Products.GenericSetup/trunk/Products/GenericSetup/zcml.py Be more careful when cleaning up registered profiles.

Stefan H. Holek stefan at epy.co.at
Thu Sep 11 17:10:39 EDT 2008


Log message for revision 91069:
  Be more careful when cleaning up registered profiles.

Changed:
  U   Products.GenericSetup/trunk/Products/GenericSetup/zcml.py

-=-
Modified: Products.GenericSetup/trunk/Products/GenericSetup/zcml.py
===================================================================
--- Products.GenericSetup/trunk/Products/GenericSetup/zcml.py	2008-09-11 19:18:35 UTC (rev 91068)
+++ Products.GenericSetup/trunk/Products/GenericSetup/zcml.py	2008-09-11 21:10:37 UTC (rev 91069)
@@ -359,10 +359,16 @@
 def cleanUpProfiles():
     global _profile_regs
     for profile_id in _profile_regs:
-        del _profile_registry._profile_info[profile_id]
-        _profile_registry._profile_ids.remove(profile_id)
+        try:
+            del _profile_registry._profile_info[profile_id]
+        except KeyError:
+            pass
+        try:
+            _profile_registry._profile_ids.remove(profile_id)
+        except ValueError:
+            pass
+
     _profile_regs = []
-
     _upgrade_registry.clear()
 
 



More information about the Checkins mailing list