euscan: fix some errors
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
This commit is contained in:
parent
833f1253a1
commit
8dc19b9856
@ -27,7 +27,7 @@ def scan(cpv, url):
|
||||
output.einfo("Using: " + url)
|
||||
|
||||
try:
|
||||
fp = helpers.urlopen(url, None, 5)
|
||||
fp = helpers.urlopen(url)
|
||||
except urllib2.URLError:
|
||||
return []
|
||||
except IOError:
|
||||
|
@ -216,7 +216,7 @@ def tryurl(fileurl, template):
|
||||
result = None
|
||||
elif 'Content-Length' in headers and headers['Content-Length'] == '0':
|
||||
result = None
|
||||
elif 'text/html' in headers['Content-Type']:
|
||||
elif 'Content-Type' in headers and 'text/html' in headers['Content-Type']:
|
||||
result = None
|
||||
elif fp.geturl() != fileurl:
|
||||
regex = regex_from_template(template)
|
||||
|
@ -117,7 +117,7 @@ def scan_upstream(query):
|
||||
try:
|
||||
alist = porttree._parse_uri_map(cpv, metadata, use=use)
|
||||
aalist = porttree._parse_uri_map(cpv, metadata)
|
||||
except InvalidDependString as e:
|
||||
except Exception as e:
|
||||
sys.stderr.write(pp.warn("%s\n" % str(e)))
|
||||
sys.stderr.write(pp.warn("Invalid SRC_URI for '%s'" % pp.pkgquery(cpv)))
|
||||
return []
|
||||
|
Loading…
Reference in New Issue
Block a user