Don't use SSLEOFError in vmware_tools.py

This commit is contained in:
Sam Doran 2019-04-11 12:59:23 -04:00 committed by Toshio Kuratomi
parent 2b8cef340e
commit 27a3ec3a12

View file

@ -8,7 +8,7 @@ __metaclass__ = type
import re
from os.path import exists, getsize
from socket import gaierror
from ssl import SSLEOFError, SSLError
from ssl import SSLError
from time import sleep
import urllib3
import traceback
@ -298,7 +298,7 @@ class Connection(ConnectionBase):
self._si = connect(**connection_kwargs)
except SSLError:
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"]))
except vim.fault.InvalidLogin as e:
raise AnsibleError("Connection Login Error: %s" % to_native(e.msg))