summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Coldrick <thomascoldrick@ct-lt-1266.unassigned>2018-07-02 15:14:16 +0100
committerThomas Coldrick <thomascoldrick@ct-lt-1266.unassigned>2018-07-02 15:14:16 +0100
commit86bdd030085e356a768d4e7136e8bc8c2c924899 (patch)
tree4f1bfb61f9801ffc5f578d394759623d0ffd2e10
parentaaf52d036c67a45356fc9f2eb7aa21542bf39782 (diff)
downloadbuildstream-coldtom/url-error.tar.gz
Catch ValueError to prevent stack tracecoldtom/url-error
-rw-r--r--buildstream/plugins/sources/_downloadablefilesource.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/buildstream/plugins/sources/_downloadablefilesource.py b/buildstream/plugins/sources/_downloadablefilesource.py
index ec9c0fbb7..4df4034e0 100644
--- a/buildstream/plugins/sources/_downloadablefilesource.py
+++ b/buildstream/plugins/sources/_downloadablefilesource.py
@@ -155,6 +155,9 @@ class DownloadableFileSource(Source):
except (urllib.error.URLError, urllib.error.ContentTooShortError, OSError) as e:
raise SourceError("{}: Error mirroring {}: {}"
.format(self, self.url, e)) from e
+ except ValueError as e:
+ raise SourceError("{}: Error mirroring {}: {}"
+ .format(self, self.url, e)) from e
def _get_mirror_dir(self):
return os.path.join(self.get_mirror_directory(),