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)
|
output.einfo("Using: " + url)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
fp = helpers.urlopen(url, None, 5)
|
fp = helpers.urlopen(url)
|
||||||
except urllib2.URLError:
|
except urllib2.URLError:
|
||||||
return []
|
return []
|
||||||
except IOError:
|
except IOError:
|
||||||
|
@ -216,7 +216,7 @@ def tryurl(fileurl, template):
|
|||||||
result = None
|
result = None
|
||||||
elif 'Content-Length' in headers and headers['Content-Length'] == '0':
|
elif 'Content-Length' in headers and headers['Content-Length'] == '0':
|
||||||
result = None
|
result = None
|
||||||
elif 'text/html' in headers['Content-Type']:
|
elif 'Content-Type' in headers and 'text/html' in headers['Content-Type']:
|
||||||
result = None
|
result = None
|
||||||
elif fp.geturl() != fileurl:
|
elif fp.geturl() != fileurl:
|
||||||
regex = regex_from_template(template)
|
regex = regex_from_template(template)
|
||||||
|
@ -117,7 +117,7 @@ def scan_upstream(query):
|
|||||||
try:
|
try:
|
||||||
alist = porttree._parse_uri_map(cpv, metadata, use=use)
|
alist = porttree._parse_uri_map(cpv, metadata, use=use)
|
||||||
aalist = porttree._parse_uri_map(cpv, metadata)
|
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("%s\n" % str(e)))
|
||||||
sys.stderr.write(pp.warn("Invalid SRC_URI for '%s'" % pp.pkgquery(cpv)))
|
sys.stderr.write(pp.warn("Invalid SRC_URI for '%s'" % pp.pkgquery(cpv)))
|
||||||
return []
|
return []
|
||||||
|
Loading…
Reference in New Issue
Block a user