]> glassweightruler.freedombox.rocks Git - waydroid.git/blobdiff - tools/helpers/http.py
tools/helpers/http.py: also handle urllib.error.URLError exceptions instead of showin...
[waydroid.git] / tools / helpers / http.py
index ff8195779cb833b5800d9fe1d955a7136c808fbe..e0533701f46645b932926be0c81356311c163c0b 100644 (file)
@@ -105,7 +105,7 @@ def download(args, url, prefix, cache=True, loglevel=logging.INFO,
         tools.helpers.run.user(args, ["rm", path])
 
     # Download the file
-    logging.log(loglevel, "Download " + url)
+    logging.log(loglevel, "Downloading " + url)
     try:
         with urllib.request.urlopen(url) as response:
             with open(path, "wb") as handle:
@@ -148,3 +148,5 @@ def retrieve(url, headers=None):
     # Handle 404
     except urllib.error.HTTPError as e:
         return e.code, ""
+    except urllib.error.URLError as e:
+        return -2, ""