mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #8384 from s0undt3ch/develop
Don't let Salt fail because `libcloud` is not installed.
This commit is contained in:
commit
8c408222de
1 changed files with 8 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue