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. Seee970237a2f
_ffe3b87d/rpmbuild.log Introduced bye970237a2f
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 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):
|
||||
|
|
Loading…
Reference in a new issue