Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Lee Baird 2019-01-13 21:11:47 -06:00
commit 7fef0cb0ca
2 changed files with 4 additions and 2 deletions

View file

@ -48,9 +48,11 @@ def crawl(self, text):
load = json.loads(text)
for key in load.keys(): # Iterate through keys of dict.
val = load.get(key)
if isinstance(val, int) or isinstance(val, dict):
if isinstance(val, int) or isinstance(val, dict) or val is None:
continue
if isinstance(val, list):
if len(val) == 0: # Make sure not indexing an empty list
continue
val = val[0] # First value should be dict.
if isinstance(val, dict): # Sanity check.
for key in val.keys():

View file

@ -922,4 +922,4 @@ def start(argv):
except Exception:
import traceback
print(traceback.print_exc())
sys.exit(1)
sys.exit(1)