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)
try:
fp = helpers.urlopen(url, None, 5)
fp = helpers.urlopen(url)
except urllib2.URLError:
return []
except IOError:

View File

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

View File

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