euscan: tweak error paths
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
This commit is contained in:
parent
2bd012ef82
commit
72e43ac4fe
@ -220,9 +220,9 @@ def main():
|
||||
file=sys.stderr, end="")
|
||||
pp.die(1, "one of the above fully-qualified ebuild names instead.")
|
||||
except GentoolkitException as err:
|
||||
pp.die(1, str(err))
|
||||
pp.die(1, '%s: %s' % (package, str(err)))
|
||||
except Exception as err:
|
||||
pp.die(1, str(err))
|
||||
pp.die(1, '%s: %s' % (package, str(err)))
|
||||
|
||||
if not CONFIG['quiet']:
|
||||
print ()
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user