[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [gettor/master] Include upload function in try/catch block



commit 0d4fc80177ac12810947f6cbdf4e4093d19f4600
Author: Cecylia Bocovich <cohosh@xxxxxxxxxxxxxx>
Date:   Wed Nov 20 09:47:28 2019 -0500

    Include upload function in try/catch block
---
 scripts/update_files | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/scripts/update_files b/scripts/update_files
index 3fa35b2..7da6836 100755
--- a/scripts/update_files
+++ b/scripts/update_files
@@ -23,8 +23,12 @@ def upload_files(release):
                 url = data['downloads'][arch][locale][asset]
                 filename = url.split('/')[-1]
                 print("Downloading " + filename)
-                subprocess.check_call(["/usr/bin/wget", url])
-                release.upload_asset(filename)
+                try:
+                    subprocess.check_call(["/usr/bin/wget", "--quiet", url])
+                    release.upload_asset(filename)
+                except:
+                    print("Error: failed to download "+url)
+
 
 
 def main(token):



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits