Browse Source

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)
tags/18.0.1
Stephen Finucane 1 year ago
parent
commit
40e18681bc
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      nova/db/sqlalchemy/api.py

+ 1
- 1
nova/db/sqlalchemy/api.py View File

@@ -202,7 +202,7 @@ def select_db_reader_mode(f):
202 202
         use_slave = keyed_args.get('use_slave', False)
203 203
 
204 204
         if use_slave:
205
-            reader_mode = get_context_manager(context).async_
205
+            reader_mode = get_context_manager(context).async
206 206
         else:
207 207
             reader_mode = get_context_manager(context).reader
208 208
 

Loading…
Cancel
Save