euscan: fix some errors

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
This commit is contained in:
Corentin Chary 2011-09-06 09:17:08 +02:00
parent 833f1253a1
commit 8dc19b9856
3 changed files with 3 additions and 3 deletions

View File

@ -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:

View File

@ -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)

View File

@ -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 []