You need to sign in or sign up before continuing.
_downloadablefilesource: handle ValueError-s
Avoid unhandled exceptions like the following: Traceback (most recent call last): ... File "/src/buildstream/buildstream/plugins/sources/_downloadablefilesource.py", line 108, in _ensure_mirror request = urllib.request.Request(self.url) File "/usr/lib/python3.6/urllib/request.py", line 329, in __init__ self.full_url = url File "/usr/lib/python3.6/urllib/request.py", line 355, in full_url self._parse() File "/usr/lib/python3.6/urllib/request.py", line 384, in _parse raise ValueError("unknown url type: %r" % self.full_url) ValueError: unknown url type: 'https//github.com/winlibs/icu4c.tar' Explicitly handle ValueErrors, so that we report this condition in the usual way: [00:00:00] FAILURE element.bst: tar source at element.bst [line 10 column 2]: Error mirroring https//github.com/winlibs/icu4c.tar: unknown url type: 'https//github.com/winlibs/icu4c.tar' Fixes #452 "Mistyped urls can cause a stack trace".
Loading
Please register or sign in to comment