euscanwww: Fixed the upstream task that was completely broken
Signed-off-by: volpino <fox91@anche.no>
This commit is contained in:
parent
a6a87260b1
commit
43e996d83d
@ -21,19 +21,27 @@ class ScanUpstream(object):
|
|||||||
def scan(self, package):
|
def scan(self, package):
|
||||||
CONFIG["format"] = "dict"
|
CONFIG["format"] = "dict"
|
||||||
output.set_query(package)
|
output.set_query(package)
|
||||||
scan_upstream(package)
|
|
||||||
|
ret = scan_upstream(package)
|
||||||
|
if ret is not None:
|
||||||
|
if len(ret) > 0:
|
||||||
|
for cp, url, version, handler, confidence in ret:
|
||||||
|
output.result(cp, version, url, handler, confidence)
|
||||||
|
|
||||||
out = output.get_formatted_output()
|
out = output.get_formatted_output()
|
||||||
out_json = output.get_formatted_output("json")
|
out_json = output.get_formatted_output("json")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
cp = out["metadata"]["cp"]
|
cpv = out[package]["metadata"]["cpv"]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
for out in out["result"]:
|
obj = self.store_package(cpv)
|
||||||
self.store_version(cp, out["version"], " ".join(out["urls"]))
|
|
||||||
|
|
||||||
self.store_result(cp, out_json)
|
for res in out[package]["result"]:
|
||||||
|
self.store_version(obj, res["version"], " ".join(res["urls"]))
|
||||||
|
|
||||||
|
self.store_result(obj, out_json)
|
||||||
|
|
||||||
return out
|
return out
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user