Commit 69e6d19d authored by Tim Peters's avatar Tim Peters

Merge rev 30262 from 3.4 branch.

`synchs` can be None -- deal with it.  Reported by Gary Poster.
parent a9736b15
...@@ -33,13 +33,14 @@ from transaction._transaction import Transaction ...@@ -33,13 +33,14 @@ from transaction._transaction import Transaction
# at top level here. # at top level here.
# Call the ISynchronizer newTransaction() method on every element of # 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. # A transaction manager needs to do this whenever begin() is called.
# Since it would be good if tm.get() returned the new transaction while # Since it would be good if tm.get() returned the new transaction while
# newTransaction() is running, calling this has to be delayed until after # newTransaction() is running, calling this has to be delayed until after
# the transaction manager has done whatever it needs to do to make its # the transaction manager has done whatever it needs to do to make its
# get() return the new txn. # get() return the new txn.
def _new_transaction(txn, synchs): def _new_transaction(txn, synchs):
if synchs:
synchs.map(lambda s: s.newTransaction(txn)) synchs.map(lambda s: s.newTransaction(txn))
class TransactionManager(object): class TransactionManager(object):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment