diff options
author | Angelos Evripiotis <jevripiotis@bloomberg.net> | 2018-10-24 12:06:23 +0100 |
---|---|---|
committer | Angelos Evripiotis <angelos.evripiotis@gmail.com> | 2018-10-25 09:11:38 +0000 |
commit | 590b3a5fbfe4f42f7ca697142bb68d272335870a (patch) | |
tree | 80ac9c35a8f596c04f535859cd5bfa8e1a8acf83 | |
parent | 837e0a0e52bb72f4b9b0e233507de30939aaa615 (diff) | |
download | buildstream-aevri/unknown-uri-452.tar.gz |
fixup! _downloadablefilesource: handle ValueError-saevri/unknown-uri-452
-rw-r--r-- | buildstream/plugins/sources/_downloadablefilesource.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/buildstream/plugins/sources/_downloadablefilesource.py b/buildstream/plugins/sources/_downloadablefilesource.py index 877854983..7d1fc07bf 100644 --- a/buildstream/plugins/sources/_downloadablefilesource.py +++ b/buildstream/plugins/sources/_downloadablefilesource.py @@ -153,6 +153,8 @@ class DownloadableFileSource(Source): .format(self, self.url, e), temporary=True) from e except (urllib.error.URLError, urllib.error.ContentTooShortError, OSError, ValueError) as e: + # Note that urllib.request.Request in the try block may throw a + # ValueError for unknown url types, so we handle it here. raise SourceError("{}: Error mirroring {}: {}" .format(self, self.url, e), temporary=True) from e |