Fix server detection

In the event the connect module encountered an issue
This commit is contained in:
angelblue05 2016-10-20 19:26:19 -05:00
parent 0ed6c8e2b0
commit d58763504a

View file

@ -99,16 +99,17 @@ class InitialSetup(object):
# Failed to identify server # Failed to identify server
return True return True
for server in current_state['Servers']: elif 'Servers' in current_state:
if server['Id'] == settings('serverId'): for server in current_state['Servers']:
# Update token if server['Id'] == settings('serverId'):
server['UserId'] = settings('userId') or None # Update token
server['AccessToken'] = settings('token') or None server['UserId'] = settings('userId') or None
self.connectmanager.update_token(current_state['Servers'], server) server['AccessToken'] = settings('token') or None
self.connectmanager.update_token(current_state['Servers'], server)
server_address = self.connectmanager.get_address(server) server_address = self.connectmanager.get_address(server)
self._set_server(server_address, server) self._set_server(server_address, server)
log.info("Found server!") log.info("Found server!")
return True return True