mirror of
https://github.com/corpnewt/gibMacOS.git
synced 2025-01-22 10:04:12 -05:00
Verify download result before assuming success
This commit is contained in:
parent
db60668857
commit
f4d09d4157
1 changed files with 2 additions and 1 deletions
|
@ -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})
|
||||
|
|
Loading…
Reference in a new issue