Verify download result before assuming success

This commit is contained in:
CorpNewt 2024-07-10 17:52:20 -05:00 committed by GitHub
parent db60668857
commit f4d09d4157
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -346,7 +346,8 @@ class gibMacOS:
self.u.info("NOTE: Only Downloading DMG Files\n")
self.u.info("Downloading {} for {}...\n".format(os.path.basename(x), name))
try:
self.d.stream_to_file(x, os.path.join(download_dir, os.path.basename(x)))
result = self.d.stream_to_file(x, os.path.join(download_dir, os.path.basename(x)))
assert result is not None
done.append({"name":os.path.basename(x), "status":True})
except:
done.append({"name":os.path.basename(x), "status":False})