VMware: Fix module usages in module_utils (#49421)

* VMware: Fix module usages in module_utils
* Skip test for Python 2.6 as SSL context is not available in Python 2.6

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
Abhijeet Kasurde 2018-12-04 10:11:29 +05:30 committed by GitHub
parent dd984709f5
commit 1b04571ea0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 140 additions and 2 deletions

View file

@ -774,8 +774,8 @@ class PyVmomi(object):
Constructor
"""
if not HAS_REQUESTS:
self.module.fail_json(msg="Unable to find 'requests' Python library which is required."
" Please install using 'pip install requests'")
module.fail_json(msg="Unable to find 'requests' Python library which is required."
" Please install using 'pip install requests'")
if not HAS_PYVMOMI:
module.fail_json(msg='PyVmomi Python module required. Install using "pip install PyVmomi"')