diff --git a/module/sources/vmware/connection.py b/module/sources/vmware/connection.py index 65d0c4d..0e4a6f5 100644 --- a/module/sources/vmware/connection.py +++ b/module/sources/vmware/connection.py @@ -16,6 +16,7 @@ import urllib3 import requests +import http # noinspection PyUnresolvedReferences from packaging import version # noinspection PyUnresolvedReferences @@ -348,7 +349,7 @@ def apply(self): # test if session is still alive try: self.session.sessionManager.currentSession.key - except (vim.fault.NotAuthenticated, AttributeError): + except (vim.fault.NotAuthenticated, AttributeError, http.client.RemoteDisconnected): log.info("No existing vCenter session found.") self.session = None self.tag_session = None