Skip to content
Permalink
Browse files

Include txn labels in __repr__'s to aid debugging problems.

  • Loading branch information...
cyrusdaboo committed Jul 27, 2015
1 parent b5dc844 commit 12ce7c9db3af6751affa3a0c9bf537f00f62d471
Showing with 12 additions and 0 deletions.
  1. +12 −0 twext/enterprise/adbapi2.py
@@ -164,6 +164,10 @@ def __init__(self, pool, threadHolder, connection, cursor, label=None):
self._label = label


def __repr__(self):
return "_ConnectedTxn({})".format(self._label)


@_forward
def paramstyle(self):
"""
@@ -425,6 +429,10 @@ def __init__(self, pool, reason, label=None):
self._label = label


def __repr__(self):
return "_NoTxn({})".format(self._label)


def _everything(self, *a, **kw):
"""
Everything fails with a L{ConnectionError}.
@@ -459,6 +467,10 @@ def __init__(self, pool, label=None):
self._label = label


def __repr__(self):
return "_WaitingTxn({})".format(self._label)


def _enspool(self, cmd, a=(), kw={}):
d = Deferred()
self._spool.append((d, cmd, a, kw))

0 comments on commit 12ce7c9

Please sign in to comment.
You can’t perform that action at this time.