Add error handling for failed downloads

This commit is contained in:
Mykola Grymalyuk
2021-12-25 19:24:52 -07:00
parent 6d917fbc29
commit a2500e50c2
5 changed files with 84 additions and 60 deletions

View File

@@ -1165,11 +1165,14 @@ B. Exit
self.download_macOS()
def download_install_assistant(self, link):
installer.download_install_assistant(self.constants.payload_path, link)
installer.install_macOS_installer(self.constants.payload_path)
input("Press any key to continue...")
# To avoid selecting the wrong installer by mistake, let user select the correct one
self.find_local_installer()
if installer.download_install_assistant(self.constants.payload_path, link):
installer.install_macOS_installer(self.constants.payload_path)
input("Press any key to continue...")
# To avoid selecting the wrong installer by mistake, let user select the correct one
self.find_local_installer()
else:
print("Failed to start download")
input("Press any key to continue...")
def download_macOS_installer(self):