small fix for server details being missing, stop crash and just try connection

dont return None for server details being missing, throw as we need to get to the botton of this
This commit is contained in:
sfaulds 2017-01-30 16:05:41 +11:00
parent d9b0f902e6
commit 4096e0ad5c
3 changed files with 8 additions and 9 deletions

View file

@ -539,12 +539,12 @@ class ConnectionManager(object):
log.info("skipping test at index: %s" % index)
return self._testNextConnectionMode(tests, index+1, server, options)
log.info("testing connection mode %s with server %s" % (mode, server['Name']))
log.info("testing connection mode %s with server %s" % (mode, server.get('Name')))
try:
result = self._tryConnect(address, timeout, options)
except Exception:
log.error("test failed for connection mode %s with server %s" % (mode, server['Name']))
log.error("test failed for connection mode %s with server %s" % (mode, server.get('Name')))
if enableRetry:
# TODO: wake on lan and retry
@ -561,7 +561,7 @@ class ConnectionManager(object):
}
else:
log.info("calling onSuccessfulConnection with connection mode %s with server %s"
% (mode, server['Name']))
% (mode, server.get('Name')))
return self._onSuccessfulConnection(server, result, mode, options)
def _onSuccessfulConnection(self, server, systemInfo, connectionMode, options):