mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00: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. Seee970237a2f_ffe3b87d/rpmbuild.log Introduced bye970237a2f
This commit is contained in:
committed by
Matt Clay
parent
0229476c44
commit
7a02f2545a
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user