Modify find_resource to support glanceclient HTTPNotFound exception.
In glanceclient, NotFound exception is encapsulated in HTTPNotFound. Change-Id: I6d354b162aa0797b4f96431b38c1fe455dd026d7
This commit is contained in:
parent
c34b11c26b
commit
c2ffb0eb31
|
@ -100,7 +100,8 @@ def find_resource(manager, name_or_id, **kwargs):
|
||||||
# Eventually this should be pulled from a common set
|
# Eventually this should be pulled from a common set
|
||||||
# of client exceptions.
|
# of client exceptions.
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
if type(ex).__name__ == 'NotFound':
|
if (type(ex).__name__ == 'NotFound' or
|
||||||
|
type(ex).__name__ == 'HTTPNotFound'):
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
raise
|
raise
|
||||||
|
|
Loading…
Reference in New Issue