mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 21:32:49 +00:00
Update vmware_inventory (#26308)
Fix adds * Exception handling * Unit tests Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
committed by
jctanner
parent
4e01397817
commit
f7c8e7bdab
@@ -3,11 +3,17 @@ import os
|
||||
import pickle
|
||||
import unittest
|
||||
import sys
|
||||
from nose.plugins.skip import SkipTest
|
||||
|
||||
|
||||
try:
|
||||
from pyVmomi import vim, vmodl
|
||||
except ImportError:
|
||||
raise SkipTest("test_vmware_inventory.py requires the python module 'pyVmomi'")
|
||||
|
||||
try:
|
||||
from vmware_inventory import VMWareInventory
|
||||
except ImportError:
|
||||
from nose.plugins.skip import SkipTest
|
||||
raise SkipTest("test_vmware_inventory.py requires the python module 'vmware_inventory'")
|
||||
|
||||
# contrib's dirstruct doesn't contain __init__.py files
|
||||
|
||||
Reference in New Issue
Block a user