Merge "Fix TypeError when doing glance retry"

This commit is contained in:
Zuul 2020-05-28 02:51:18 +00:00 committed by Gerrit Code Review
commit 25186b3c27
1 changed files with 2 additions and 2 deletions

View File

@ -216,6 +216,7 @@ class GlanceClientWrapper(object):
glanceclient.exc.InvalidEndpoint,
glanceclient.exc.CommunicationError)
num_attempts = 1 + CONF.glance_num_retries
glance_controller = kwargs.pop('controller', 'images')
store_id = kwargs.pop('store_id', None)
base_image_ref = kwargs.pop('base_image_ref', None)
@ -230,8 +231,7 @@ class GlanceClientWrapper(object):
client.http_client.additional_headers = headers
try:
controller = getattr(client,
kwargs.pop('controller', 'images'))
controller = getattr(client, glance_controller)
return getattr(controller, method)(*args, **kwargs)
except retry_excs as e:
netloc = self.netloc