Don't call potentially missing shade library (#53734)

* Check for openstack

* Account for HAS_SHADE not being a tuple
This commit is contained in:
Akmod 2019-07-06 01:27:44 -06:00 committed by Tyler Johnson
parent 5ef8414781
commit c9cb18ffe6
No known key found for this signature in database
GPG key ID: 691E31397E27D004

View file

@ -273,6 +273,12 @@ def get_dependencies():
'''
Warn if dependencies aren't met.
'''
if not HAS_SHADE:
log.warning('"shade" not found')
return False
elif hasattr(HAS_SHADE, '__len__') and not HAS_SHADE[0]:
log.warning(HAS_SHADE[1])
return False
deps = {
'shade': shade[0],
'os_client_config': shade[0],