euscan: tweak error paths
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
This commit is contained in:
@ -97,6 +97,8 @@ def scan(cpv, url):
|
||||
return []
|
||||
|
||||
resolved_url = helpers.parse_mirror(url)
|
||||
if not resolved_url:
|
||||
return []
|
||||
|
||||
cp, ver, rev = portage.pkgsplit(cpv)
|
||||
|
||||
@ -115,6 +117,8 @@ def brute_force(cpv, url):
|
||||
cp, ver, rev = portage.pkgsplit(cpv)
|
||||
|
||||
url = helpers.parse_mirror(url)
|
||||
if not url:
|
||||
return []
|
||||
|
||||
for bp in BRUTEFORCE_BLACKLIST_PACKAGES:
|
||||
if re.match(bp, cp):
|
||||
|
@ -407,7 +407,7 @@ def parse_mirror(uri):
|
||||
shuffle(mirrors)
|
||||
uri = mirrors[0].strip("/") + "/" + path
|
||||
else:
|
||||
euscan.output.einfo("No known mirror by the name: %s\n" % (mirrorname))
|
||||
euscan.output.einfo("No known mirror by the name: %s" % (mirrorname))
|
||||
return None
|
||||
|
||||
return uri
|
||||
|
Reference in New Issue
Block a user