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

Allow to skip test_aci_rest if no xmljson is installed

There is no such package in Fedora so building the Fedora package fails. See
e970237a2f_ffe3b87d/rpmbuild.log

Introduced by e970237a2f
This commit is contained in:
Frederic Lepied 2017-07-19 11:31:38 +02:00 committed by Matt Clay
parent 0229476c44
commit 7a02f2545a

View file

@ -25,9 +25,12 @@ from ansible.modules.network.aci.aci_rest import aci_response
from nose.plugins.skip import SkipTest
from lxml import etree
if sys.version_info >= (2, 7):
from xmljson import cobra
try:
from lxml import etree
if sys.version_info >= (2, 7):
from xmljson import cobra
except ImportError:
raise SkipTest("aci Ansible modules require the lxml and xmljson Python libraries")
class AciRest(unittest.TestCase):