diff --git a/pydal/base.py b/pydal/base.py index a927321ed..597f7fbe0 100644 --- a/pydal/base.py +++ b/pydal/base.py @@ -379,7 +379,7 @@ def get_instances(): def distributed_transaction_begin(*instances): if not instances: return - thread_key = "%s.%s" % (socket.gethostname(), threading.currentThread()) + thread_key = "%s.%s" % (socket.gethostname(), threading.current_thread()) instances = enumerate(instances) keys = ["%s.%i" % (thread_key, i) for (i, db) in instances] for (i, db) in instances: @@ -395,7 +395,7 @@ def distributed_transaction_commit(*instances): if not instances: return instances = enumerate(instances) - thread_key = "%s.%s" % (socket.gethostname(), threading.currentThread()) + thread_key = "%s.%s" % (socket.gethostname(), threading.current_thread()) keys = ["%s.%i" % (thread_key, i) for (i, db) in instances] for (i, db) in instances: if not db._adapter.support_distributed_transaction():