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:22 UTC

[buildstream] branch coldtom/url-error created (now 86bdd03)

This is an automated email from the ASF dual-hosted git repository.

github-bot pushed a change to branch coldtom/url-error
in repository https://gitbox.apache.org/repos/asf/buildstream.git.


      at 86bdd03  Catch ValueError to prevent stack trace

This branch includes the following new commits:

     new 86bdd03  Catch ValueError to prevent stack trace

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[buildstream] 01/01: Catch ValueError to prevent stack trace

Posted by gi...@apache.org.
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(),