[Notes] [Git][BuildStream/buildstream][aevri/unknown-uri-452] fixup! _downloadablefilesource: handle ValueError-s



Title: GitLab

Angelos Evripiotis pushed to branch aevri/unknown-uri-452 at BuildStream / buildstream

Commits:

1 changed file:

Changes:

  • buildstream/plugins/sources/_downloadablefilesource.py
    ... ... @@ -153,6 +153,8 @@ class DownloadableFileSource(Source):
    153 153
                                   .format(self, self.url, e), temporary=True) from e
    
    154 154
     
    
    155 155
             except (urllib.error.URLError, urllib.error.ContentTooShortError, OSError, ValueError) as e:
    
    156
    +            # Note that urllib.request.Request in the try block may throw a
    
    157
    +            # ValueError for unknown url types, so we handle it here.
    
    156 158
                 raise SourceError("{}: Error mirroring {}: {}"
    
    157 159
                                   .format(self, self.url, e), temporary=True) from e
    
    158 160
     
    



  • [Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]