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

pull/5143/head
Evgenii Terechkov 12 years ago
parent c259993559
commit b5d8aa9ff1

@ -205,8 +205,12 @@ action: ovirt >
''' '''
from ovirtsdk.api import API try:
from ovirtsdk.xml import params 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 # create connection with API

Loading…
Cancel
Save