mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
Use ovirtsdk if it installed, but fall out gracefully if it is not
This commit is contained in:
8
library/cloud/ovirt
Normal file → Executable file
8
library/cloud/ovirt
Normal file → Executable file
@@ -205,8 +205,12 @@ action: ovirt >
|
||||
|
||||
|
||||
'''
|
||||
from ovirtsdk.api import API
|
||||
from ovirtsdk.xml import params
|
||||
try:
|
||||
from ovirtsdk.api import API
|
||||
from ovirtsdk.xml import params
|
||||
except ImportError:
|
||||
print "failed=True msg='ovirtsdk required for this module'"
|
||||
sys.exit(1)
|
||||
|
||||
# ------------------------------------------------------------------- #
|
||||
# create connection with API
|
||||
|
||||
Reference in New Issue
Block a user