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
(cherry picked from commit bd7d991309)
This commit is contained in:
Stephen Finucane 2018-08-28 17:01:07 +01:00 committed by Matthew Thode
parent 43f6f7479c
commit 40e18681bc
1 changed files with 1 additions and 1 deletions

View File

@ -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