[CMF-checkins] SVN: CMF/branches/2.1/CMFCore/Skinnable.py Merged trunk r73986:73987 into 2.1 branch.

Stefan H. Holek stefan at epy.co.at
Tue Apr 3 04:40:23 EDT 2007


Log message for revision 73988:
  Merged trunk r73986:73987 into 2.1 branch.
  
  Be extra careful in __del__. Module-level vars may have been Noned already.
  

Changed:
  U   CMF/branches/2.1/CMFCore/Skinnable.py

-=-
Modified: CMF/branches/2.1/CMFCore/Skinnable.py
===================================================================
--- CMF/branches/2.1/CMFCore/Skinnable.py	2007-04-03 08:36:44 UTC (rev 73987)
+++ CMF/branches/2.1/CMFCore/Skinnable.py	2007-04-03 08:40:22 UTC (rev 73988)
@@ -58,8 +58,10 @@
         self.tid = tid
     def __del__(self):
         tid = self.tid
-        if SKINDATA.has_key(tid):
-            del SKINDATA[tid]
+        # Be extra careful in __del__
+        if SKINDATA is not None:
+            if SKINDATA.has_key(tid):
+                del SKINDATA[tid]
 
 
 class SkinnableObjectManager(ObjectManager):



More information about the CMF-checkins mailing list