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
+1 -1
View File
@@ -373,7 +373,7 @@ def download_file(link, location, is_gui=None):
print(f"https://github.com/dortania/OpenCore-Legacy-Patcher/releases/download/{constants.Constants().patcher_version}/OpenCore-Patcher-TUI-Offline.app.zip")
else:
print(link)
sys.exit()
return None
def elevated(*args, **kwargs) -> subprocess.CompletedProcess:
# When runnign through our GUI, we run as root, however we do not get uid 0