Commit c729e5f9 authored by Tres Seaver's avatar Tres Seaver

PEP8, whitespace.

parent 90aa4eb0
...@@ -21,9 +21,9 @@ import threading ...@@ -21,9 +21,9 @@ import threading
from zope.interface import implementer from zope.interface import implementer
from transaction.weakset import WeakSet
from transaction.interfaces import ITransactionManager from transaction.interfaces import ITransactionManager
from transaction.interfaces import TransientError from transaction.interfaces import TransientError
from transaction.weakset import WeakSet
from transaction._compat import reraise from transaction._compat import reraise
from transaction._transaction import Transaction from transaction._transaction import Transaction
...@@ -54,6 +54,7 @@ def _new_transaction(txn, synchs): ...@@ -54,6 +54,7 @@ def _new_transaction(txn, synchs):
# so that Transactions "see" synchronizers that get registered after the # so that Transactions "see" synchronizers that get registered after the
# Transaction object is constructed. # Transaction object is constructed.
@implementer(ITransactionManager) @implementer(ITransactionManager)
class TransactionManager(object): class TransactionManager(object):
...@@ -149,6 +150,7 @@ class ThreadTransactionManager(TransactionManager, threading.local): ...@@ -149,6 +150,7 @@ class ThreadTransactionManager(TransactionManager, threading.local):
Each thread is associated with a unique transaction. Each thread is associated with a unique transaction.
""" """
class Attempt(object): class Attempt(object):
def __init__(self, manager): def __init__(self, manager):
...@@ -160,7 +162,7 @@ class Attempt(object): ...@@ -160,7 +162,7 @@ class Attempt(object):
if retry: if retry:
return retry # suppress the exception if necessary return retry # suppress the exception if necessary
reraise(t, v, tb) # otherwise reraise the exception reraise(t, v, tb) # otherwise reraise the exception
def __enter__(self): def __enter__(self):
return self.manager.__enter__() return self.manager.__enter__()
...@@ -172,4 +174,3 @@ class Attempt(object): ...@@ -172,4 +174,3 @@ class Attempt(object):
return self._retry_or_raise(*sys.exc_info()) return self._retry_or_raise(*sys.exc_info())
else: else:
return self._retry_or_raise(t, v, tb) return self._retry_or_raise(t, v, tb)
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