[Checkins] SVN: zope.container/trunk/ Preserve the original exception traceback in OrderedContainer.__setitem__.

Marius Gedminas marius at pov.lt
Mon Mar 7 15:10:25 EST 2011


Log message for revision 120790:
  Preserve the original exception traceback in OrderedContainer.__setitem__.
  
  I tried to adjust the doctest to ensure the traceback is not lost, but
  as soon as I start it with a '...' (because I don't care about oldest frames),
  the doctest comparator ignores everything about the traceback.
  
  

Changed:
  U   zope.container/trunk/CHANGES.txt
  U   zope.container/trunk/src/zope/container/ordered.py

-=-
Modified: zope.container/trunk/CHANGES.txt
===================================================================
--- zope.container/trunk/CHANGES.txt	2011-03-07 13:13:57 UTC (rev 120789)
+++ zope.container/trunk/CHANGES.txt	2011-03-07 20:10:24 UTC (rev 120790)
@@ -8,7 +8,9 @@
 - Send ``IContainerModifiedEvent`` *after* the container is modified
   (LP#705600).
 
+- Preserve the original exception traceback in OrderedContainer.__setitem__.
 
+
 3.12.0 (2010-12-14)
 -------------------
 

Modified: zope.container/trunk/src/zope/container/ordered.py
===================================================================
--- zope.container/trunk/src/zope/container/ordered.py	2011-03-07 13:13:57 UTC (rev 120789)
+++ zope.container/trunk/src/zope/container/ordered.py	2011-03-07 20:10:24 UTC (rev 120790)
@@ -211,10 +211,10 @@
         # This function creates a lot of events that other code listens to.
         try:
             setitem(self, self._data.__setitem__, key, object)
-        except Exception, e:
+        except Exception:
             if not existed:
                 self._order.remove(key)
-            raise e
+            raise
 
         return key
 



More information about the checkins mailing list