[Notes] [Git][BuildStream/buildstream][master] 2 commits: _downloadablefilesource: handle ValueError-s



Title: GitLab

Angelos Evripiotis pushed to branch master at BuildStream / buildstream

Commits:

1 changed file:

Changes:

  • buildstream/plugins/sources/_downloadablefilesource.py
    ... ... @@ -152,7 +152,9 @@ class DownloadableFileSource(Source):
    152 152
                 raise SourceError("{}: Error mirroring {}: {}"
    
    153 153
                                   .format(self, self.url, e), temporary=True) from e
    
    154 154
     
    
    155
    -        except (urllib.error.URLError, urllib.error.ContentTooShortError, OSError) as e:
    
    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]