Created
February 15, 2017 17:21
-
-
Save negz/64ad6692217eb7a1fb9937339439ba60 to your computer and use it in GitHub Desktop.
Log audit script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
json_lines = [json.loads(line) for line in open("sumo.json", "r").readlines()] | |
for line in json_lines: | |
host = line.get("host") | |
if host is None: | |
print "Line missing host key" | |
if host == "": | |
print "Line has empty host key" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment