diff --git a/pym/euscan/handlers/rubygem.py b/pym/euscan/handlers/rubygem.py index a00f5ac..19e143d 100644 --- a/pym/euscan/handlers/rubygem.py +++ b/pym/euscan/handlers/rubygem.py @@ -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: diff --git a/pym/euscan/helpers.py b/pym/euscan/helpers.py index 3838f8e..d9a425e 100644 --- a/pym/euscan/helpers.py +++ b/pym/euscan/helpers.py @@ -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) diff --git a/pym/euscan/scan.py b/pym/euscan/scan.py index cf52801..1eb7bf9 100644 --- a/pym/euscan/scan.py +++ b/pym/euscan/scan.py @@ -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 []