euscan: added scan time to formatted output

scan_time in metadata dictionary

Signed-off-by: volpino <fox91@anche.no>
This commit is contained in:
volpino 2012-05-24 20:27:18 +02:00
parent 9989433ad5
commit 4d606ae1cf

View File

@ -102,7 +102,8 @@ def scan_upstream(query):
return None
# useful data only for formatted output
output.metadata("datetime", datetime.now().isoformat(), show=False)
start_time = datetime.now()
output.metadata("datetime", start_time.isoformat(), show=False)
output.metadata("cp", pkg.cp, show=False)
output.metadata("cpv", pkg.cpv, show=False)
@ -152,4 +153,8 @@ def scan_upstream(query):
else:
urls = alist
# output scan time for formatted output
scan_time = (datetime.now() - start_time).total_seconds()
output.metadata("scan_time", scan_time, show=False)
return scan_upstream_urls(pkg.cpv, urls)