From f4d09d4157964667f61d824be10917e9155ba5be Mon Sep 17 00:00:00 2001 From: CorpNewt <12772521+corpnewt@users.noreply.github.com> Date: Wed, 10 Jul 2024 17:52:20 -0500 Subject: [PATCH] Verify download result before assuming success --- gibMacOS.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gibMacOS.py b/gibMacOS.py index 34999e5..c929f2f 100755 --- a/gibMacOS.py +++ b/gibMacOS.py @@ -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})