You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by gi...@apache.org on 2020/12/29 13:02:23 UTC
[buildstream] 01/01: Catch ValueError to prevent stack trace
This is an automated email from the ASF dual-hosted git repository.
github-bot pushed a commit to branch coldtom/url-error
in repository https://gitbox.apache.org/repos/asf/buildstream.git
commit 86bdd030085e356a768d4e7136e8bc8c2c924899
Author: Thomas Coldrick <th...@ct-lt-1266.unassigned>
AuthorDate: Mon Jul 2 15:14:16 2018 +0100
Catch ValueError to prevent stack trace
---
buildstream/plugins/sources/_downloadablefilesource.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/buildstream/plugins/sources/_downloadablefilesource.py b/buildstream/plugins/sources/_downloadablefilesource.py
index ec9c0fb..4df4034 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(),