Don't use '_TransactionContextManager._async'
In commit 2d532963, all instances of 'async' were replaced with 'async_'
in preparation for Python 3.7. However, one of these should not have
been changed as it refers to an oslo.db object attribute. That attribute
has actually been renamed itself but that rename is only present from
oslo.db 4.40.0 [1]. Thankfully, an alias to the older name is provided
so we use that.
[1] https://github.com/openstack/oslo.db/commit/df6bf34
Change-Id: I1afd0ba34a9ebcb63edb91e880ef60580befb32e
Closes-Bug: #1788833
This commit is contained in:
@@ -202,7 +202,7 @@ def select_db_reader_mode(f):
|
||||
use_slave = keyed_args.get('use_slave', False)
|
||||
|
||||
if use_slave:
|
||||
reader_mode = get_context_manager(context).async_
|
||||
reader_mode = get_context_manager(context).async
|
||||
else:
|
||||
reader_mode = get_context_manager(context).reader
|
||||
|
||||
|
||||
Reference in New Issue
Block a user