Skip to content

Commit

Permalink
Merge pull request #5 from cloudlinux/bugfix/summary-values
Browse files Browse the repository at this point in the history
Bugfix: summary values not a property
  • Loading branch information
histrio authored Aug 13, 2019
2 parents 502e21a + 2abc938 commit 788c9c6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/kcare_qualys.py
Original file line number Diff line number Diff line change
Expand Up @@ -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='"')
Expand All @@ -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:
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 788c9c6

Please sign in to comment.