From 0d8ad9c45d45562ba9e7c7548a59c62dc1d7e59a Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Mon, 14 Jan 2019 14:01:09 +0530 Subject: cerbero: Fix fallback to mirror on URLError On Python 2, URLError is in the urllib2 module, not urllib Closes https://gitlab.freedesktop.org/gstreamer/cerbero/issues/112 --- cerbero/build/source.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cerbero/build/source.py b/cerbero/build/source.py index 6dbd390d..719ded6d 100644 --- a/cerbero/build/source.py +++ b/cerbero/build/source.py @@ -20,6 +20,7 @@ import os import shutil import tarfile import urllib +import urllib2 import urlparse from cerbero.config import Platform @@ -128,7 +129,7 @@ class Tarball (Source): try: shell.download(self.url, self.download_path, check_cert=cc, overwrite=redownload) - except (FatalError, urllib.error.URLError): + except (FatalError, urllib2.URLError): # Try our mirror shell.download(self.mirror_url, self.download_path, check_cert=cc, overwrite=redownload) -- cgit v1.2.3