[Zodb-checkins] SVN: ZODB/branches/3.4/src/transaction/_manager.py Oops! synchs can be None. Reported by Gary Poster.

Tim Peters tim.one at comcast.net
Thu May 5 23:57:40 EDT 2005


Log message for revision 30262:
  Oops!  synchs can be None.  Reported by Gary Poster.
  

Changed:
  U   ZODB/branches/3.4/src/transaction/_manager.py

-=-
Modified: ZODB/branches/3.4/src/transaction/_manager.py
===================================================================
--- ZODB/branches/3.4/src/transaction/_manager.py	2005-05-06 02:25:29 UTC (rev 30261)
+++ ZODB/branches/3.4/src/transaction/_manager.py	2005-05-06 03:57:35 UTC (rev 30262)
@@ -33,14 +33,15 @@
 # at top level here.
 
 # Call the ISynchronizer newTransaction() method on every element of
-# WeakSet synchs.
+# WeakSet synchs (or skip it if synchs is None).
 # A transaction manager needs to do this whenever begin() is called.
 # Since it would be good if tm.get() returned the new transaction while
 # newTransaction() is running, calling this has to be delayed until after
 # the transaction manager has done whatever it needs to do to make its
 # get() return the new txn.
 def _new_transaction(txn, synchs):
-    synchs.map(lambda s: s.newTransaction(txn))
+    if synchs:
+        synchs.map(lambda s: s.newTransaction(txn))
 
 class TransactionManager(object):
 



More information about the Zodb-checkins mailing list