1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Use ovirtsdk if it installed, but fall out gracefully if it is not

This commit is contained in:
Evgenii Terechkov 2013-12-03 20:21:16 +08:00
parent c259993559
commit b5d8aa9ff1

4
library/cloud/ovirt Normal file → Executable file
View file

@ -205,8 +205,12 @@ action: ovirt >
'''
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