mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-11 11:41:32 -07:00
Don't use SSLEOFError in vmware_tools.py
This commit is contained in:
parent
2b8cef340e
commit
27a3ec3a12
1 changed files with 2 additions and 2 deletions
|
@ -8,7 +8,7 @@ __metaclass__ = type
|
||||||
import re
|
import re
|
||||||
from os.path import exists, getsize
|
from os.path import exists, getsize
|
||||||
from socket import gaierror
|
from socket import gaierror
|
||||||
from ssl import SSLEOFError, SSLError
|
from ssl import SSLError
|
||||||
from time import sleep
|
from time import sleep
|
||||||
import urllib3
|
import urllib3
|
||||||
import traceback
|
import traceback
|
||||||
|
@ -298,7 +298,7 @@ class Connection(ConnectionBase):
|
||||||
self._si = connect(**connection_kwargs)
|
self._si = connect(**connection_kwargs)
|
||||||
except SSLError:
|
except SSLError:
|
||||||
raise AnsibleError("SSL Error: Certificate verification failed.")
|
raise AnsibleError("SSL Error: Certificate verification failed.")
|
||||||
except (gaierror, SSLEOFError):
|
except (gaierror):
|
||||||
raise AnsibleError("Connection Error: Unable to connect to '%s'." % to_native(connection_kwargs["host"]))
|
raise AnsibleError("Connection Error: Unable to connect to '%s'." % to_native(connection_kwargs["host"]))
|
||||||
except vim.fault.InvalidLogin as e:
|
except vim.fault.InvalidLogin as e:
|
||||||
raise AnsibleError("Connection Login Error: %s" % to_native(e.msg))
|
raise AnsibleError("Connection Login Error: %s" % to_native(e.msg))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue