Updated last.py to dump json results straight away

Output was not usable with cli utilities such as: ```cat results.json | python -m simplejson.tool```. 
It's now usable and works perfectly.
pull/68/head
Paul 2017-04-06 14:20:00 +02:00 committed by GitHub
parent dfd194fa2b
commit 51f49ddcaa
1 changed files with 1 additions and 3 deletions

View File

@ -26,9 +26,7 @@ def download_last(m, last, out=None):
exit(0)
else:
with open(out, 'w') as f:
for e in result['response']:
f.write(json.dumps(e) + '\n')
f.write(json.dumps(result['response']))
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='Download latest events from a MISP instance.')