From 2abc938d73fa501c64346aa84c0e408b0b614b43 Mon Sep 17 00:00:00 2001 From: Rinat Sabitov Date: Tue, 13 Aug 2019 11:51:30 +0300 Subject: [PATCH] Bugfix: summary values not a property --- src/kcare_qualys.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/kcare_qualys.py b/src/kcare_qualys.py index 809939a..d8a6d2a 100644 --- a/src/kcare_qualys.py +++ b/src/kcare_qualys.py @@ -208,6 +208,8 @@ def get_latest(kernel): @connection_wrapper def summary(args, qgc, keys): + report_assets = {} + if args.files: files_input = fileinput.input(files=args.files) reader = csv.reader(files_input, delimiter=',', quotechar='"') @@ -216,7 +218,6 @@ def summary(args, qgc, keys): while headers is not None and 'QID' not in headers: headers = next(reader, None) - report_assets = {} for row in reader: data = dict(zip(headers, row)) if 'QID' in data: @@ -248,12 +249,12 @@ def summary(args, qgc, keys): else: rec.append('patched') writer.writerow(rec) - for host, ip in report_assets.values: + + for host, ip in report_assets.values(): rec = [host, ip, '', 'not patched', "Not registered"] writer.writerow(rec) - def get_qid_map(qgc, keys): result = collections.defaultdict(set) plan = collections.defaultdict(set)