mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix for AttributeError with libcloud <0.15
ex_list_projects is introduced in version 0.15 of libcloud. I'm simply cathing the AttributeError here to return False, just like there would be not project. Fixes #31729
This commit is contained in:
parent
9162925dd0
commit
72eab406cd
1 changed files with 5 additions and 1 deletions
|
@ -202,7 +202,11 @@ def get_project(conn, vm_):
|
|||
'''
|
||||
Return the project to use.
|
||||
'''
|
||||
projects = conn.ex_list_projects()
|
||||
try:
|
||||
projects = conn.ex_list_projects()
|
||||
except AttributeError:
|
||||
# with versions <0.15 of libcloud this is causing an AttributeError.
|
||||
return False
|
||||
projid = config.get_cloud_config_value('projectid', vm_, __opts__)
|
||||
|
||||
if not projid:
|
||||
|
|
Loading…
Add table
Reference in a new issue