Fix JSON Output

This commit is contained in:
Narbeh Arakil
2020-05-11 17:12:00 +04:00
parent f2418593ca
commit 0cf8016d1e
3 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -232,7 +232,7 @@ def show_result(user_args):
if user_args.json_save_true:
for host in hosts:
with open(host.split('.')[0] + '.json', 'w', encoding='UTF-8') as fp:
fp.write(json.dumps(context))
fp.write(json.dumps(context[host]))
def export_csv(context, filename):