1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-11-10 22:56:15 +01:00

Fix urlgrab to skip mirrors with invalid scheme

The package will get downloaded from another mirror
or directly from the API.
This commit is contained in:
Daniel Mach 2023-04-28 09:02:13 +02:00
parent 6d5493130e
commit ea69d13157

View File

@ -10,6 +10,8 @@ from urllib.parse import urlparse
from urllib.parse import unquote
from urllib.error import URLError
import urllib3.exceptions
from .core import streamfile
@ -37,7 +39,7 @@ class OscMirrorGroup:
try:
self._grabber.urlgrab(mirror, filename, text)
return True
except (HTTPError, URLError) as e:
except (HTTPError, URLError, urllib3.exceptions.URLSchemeUnknown) as e:
# try next mirror
pass