[ZODB-Dev] TypeError: unbound method beforeCompletion() must be called with Synchronizer instance as first argument (got Transaction instance instead)
Wichert Akkerman
wichert at wiggy.net
Tue Jul 26 07:48:20 EDT 2011
On 07/26/2011 01:47 PM, Stéphane Klein wrote:
> Hi,
>
> I've this in my source code :
>
> from zope.interface import implements
> from transaction.interfaces import ISynchronizer
>
> class Synchronizer(object):
> implements(ISynchronizer)
>
> def beforeCompletion(self, transaction):
> print("beforeCompletion")
>
> def afterCompletion(self, transaction):
> print("afterCompletion", transaction)
>
> def newTransaction(self, transaction):
> print("newTransaction", transaction)
>
> ...
>
> transaction.manager.registerSynch(Synchronizer)
I bet this works:
transaction.manager.registerSynch(Synchronizer())
More information about the ZODB-Dev
mailing list