mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Don't let Salt fail because libcloud
is not installed.
This commit is contained in:
parent
865b009e1e
commit
0e9b977384
@ -28,7 +28,11 @@ import salt.cloud
|
||||
import salt.cloud.config
|
||||
from salt.cloud.utils import parsers
|
||||
from salt.cloud.exceptions import SaltCloudException, SaltCloudSystemExit
|
||||
from salt.cloud.libcloudfuncs import libcloud_version
|
||||
try:
|
||||
from salt.cloud.libcloudfuncs import libcloud_version
|
||||
HAS_LIBCLOUD = True
|
||||
except ImportError:
|
||||
HAS_LIBCLOUD = False
|
||||
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
@ -39,6 +43,9 @@ class SaltCloud(parsers.SaltCloudParser):
|
||||
'''
|
||||
Execute the salt-cloud command line
|
||||
'''
|
||||
if HAS_LIBCLOUD is False:
|
||||
self.error('salt-cloud requires >= libcloud 0.11.4')
|
||||
|
||||
libcloud_version()
|
||||
|
||||
# Parse shell arguments
|
||||
|
Loading…
Reference in New Issue
Block a user