[Checkins] SVN: zope.sendmail/trunk/src/zope/sendmail/tests/test_delivery.py Restore Python 2.4 compatibility.
Tres Seaver
tseaver at palladion.com
Fri Jul 2 11:50:55 EDT 2010
Log message for revision 114122:
Restore Python 2.4 compatibility.
Changed:
U zope.sendmail/trunk/src/zope/sendmail/tests/test_delivery.py
-=-
Modified: zope.sendmail/trunk/src/zope/sendmail/tests/test_delivery.py
===================================================================
--- zope.sendmail/trunk/src/zope/sendmail/tests/test_delivery.py 2010-07-02 15:07:21 UTC (rev 114121)
+++ zope.sendmail/trunk/src/zope/sendmail/tests/test_delivery.py 2010-07-02 15:50:54 UTC (rev 114122)
@@ -180,16 +180,17 @@
msgid = delivery.send(fromaddr, toaddrs, opt_headers + message)
try:
- transaction.commit()
- except:
- if transaction.get()._voted:
- # We voted for commit then failed, reraise
- raise
+ try:
+ transaction.commit()
+ except:
+ if transaction.get()._voted:
+ # We voted for commit then failed, reraise
+ raise
+ else:
+ # We vetoed a commit, that's good.
+ pass
else:
- # We vetoed a commit, that's good.
- pass
- else:
- self.fail("Did not raise an exception in vote")
+ self.fail("Did not raise an exception in vote")
finally:
# Clean up after ourselves
transaction.abort()
More information about the checkins
mailing list