abort download if server is not set correctly.

This commit is contained in:
sfaulds 2017-01-11 13:14:55 +11:00
parent b235046ea6
commit 1f34e043ec

View file

@ -216,6 +216,10 @@ class DownloadUtils(object):
self._ensure_server(server_id) self._ensure_server(server_id)
server = self.session if server_id is None else self.servers[server_id] server = self.session if server_id is None else self.servers[server_id]
if server is None or server.get("Server", None) is None or server.get("UserId", None) is None:
log.info("Aborting download, Server Details Error: %s", server)
return None
if server_id is None and self.session_requests is not None: # Main server if server_id is None and self.session_requests is not None: # Main server
session = self.session_requests session = self.session_requests
else: else: