mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-12 09:04:21 -07: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
http://38.145.33.116/dlrn/e9/70/e970237a2f288c9363b0c012e53c01f20f6b6a74_ffe3b87d/rpmbuild.log
Introduced by e970237a2f
This commit is contained in:
parent
0229476c44
commit
7a02f2545a
1 changed files with 6 additions and 3 deletions
|
@ -25,9 +25,12 @@ from ansible.modules.network.aci.aci_rest import aci_response
|
||||||
|
|
||||||
from nose.plugins.skip import SkipTest
|
from nose.plugins.skip import SkipTest
|
||||||
|
|
||||||
from lxml import etree
|
try:
|
||||||
if sys.version_info >= (2, 7):
|
from lxml import etree
|
||||||
from xmljson import cobra
|
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):
|
class AciRest(unittest.TestCase):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue