Bugfix: Fetch should not force use of curl to check url existence (#34225)
* Bugfix: Fetch should not force use of curl to check url existence * Switch type hints from comments to actual hints
This commit is contained in:
parent
65a5369d6a
commit
18efd817b1
@ -106,12 +106,12 @@ class FetchStrategy(object):
|
|||||||
#: The URL attribute must be specified either at the package class
|
#: The URL attribute must be specified either at the package class
|
||||||
#: level, or as a keyword argument to ``version()``. It is used to
|
#: level, or as a keyword argument to ``version()``. It is used to
|
||||||
#: distinguish fetchers for different versions in the package DSL.
|
#: distinguish fetchers for different versions in the package DSL.
|
||||||
url_attr = None # type: Optional[str]
|
url_attr: Optional[str] = None
|
||||||
|
|
||||||
#: Optional attributes can be used to distinguish fetchers when :
|
#: Optional attributes can be used to distinguish fetchers when :
|
||||||
#: classes have multiple ``url_attrs`` at the top-level.
|
#: classes have multiple ``url_attrs`` at the top-level.
|
||||||
# optional attributes in version() args.
|
# optional attributes in version() args.
|
||||||
optional_attrs = [] # type: List[str]
|
optional_attrs: List[str] = []
|
||||||
|
|
||||||
def __init__(self, **kwargs):
|
def __init__(self, **kwargs):
|
||||||
# The stage is initialized late, so that fetch strategies can be
|
# The stage is initialized late, so that fetch strategies can be
|
||||||
@ -335,7 +335,7 @@ def fetch(self):
|
|||||||
url = None
|
url = None
|
||||||
errors = []
|
errors = []
|
||||||
for url in self.candidate_urls:
|
for url in self.candidate_urls:
|
||||||
if not web_util.url_exists(url, self.curl):
|
if not web_util.url_exists(url):
|
||||||
tty.debug("URL does not exist: " + url)
|
tty.debug("URL does not exist: " + url)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user