Merge "Fix TypeError when doing glance retry"
This commit is contained in:
commit
25186b3c27
|
@ -216,6 +216,7 @@ class GlanceClientWrapper(object):
|
||||||
glanceclient.exc.InvalidEndpoint,
|
glanceclient.exc.InvalidEndpoint,
|
||||||
glanceclient.exc.CommunicationError)
|
glanceclient.exc.CommunicationError)
|
||||||
num_attempts = 1 + CONF.glance_num_retries
|
num_attempts = 1 + CONF.glance_num_retries
|
||||||
|
glance_controller = kwargs.pop('controller', 'images')
|
||||||
store_id = kwargs.pop('store_id', None)
|
store_id = kwargs.pop('store_id', None)
|
||||||
base_image_ref = kwargs.pop('base_image_ref', None)
|
base_image_ref = kwargs.pop('base_image_ref', None)
|
||||||
|
|
||||||
|
@ -230,8 +231,7 @@ class GlanceClientWrapper(object):
|
||||||
client.http_client.additional_headers = headers
|
client.http_client.additional_headers = headers
|
||||||
|
|
||||||
try:
|
try:
|
||||||
controller = getattr(client,
|
controller = getattr(client, glance_controller)
|
||||||
kwargs.pop('controller', 'images'))
|
|
||||||
return getattr(controller, method)(*args, **kwargs)
|
return getattr(controller, method)(*args, **kwargs)
|
||||||
except retry_excs as e:
|
except retry_excs as e:
|
||||||
netloc = self.netloc
|
netloc = self.netloc
|
||||||
|
|
Loading…
Reference in New Issue