From 4d606ae1cf98a92536eac3d3f16f701990c61123 Mon Sep 17 00:00:00 2001 From: volpino Date: Thu, 24 May 2012 20:27:18 +0200 Subject: [PATCH] euscan: added scan time to formatted output scan_time in metadata dictionary Signed-off-by: volpino --- pym/euscan/scan.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pym/euscan/scan.py b/pym/euscan/scan.py index 37cd71f..f6660e3 100644 --- a/pym/euscan/scan.py +++ b/pym/euscan/scan.py @@ -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)