leaflet, accept valueerrors in json stream

master
Michael Murtaugh 7 years ago
parent fc83652e3b
commit 6f6755adb3

@ -618,9 +618,11 @@ def make_gallery(args):
for line in sys.stdin:
line = line.rstrip()
if line and not line.startswith("#"):
try:
item = json.loads(line)
items.append(item)
except ValueError as e:
print (u"Error reading line {0}, {1}".format(line, e).encode("utf-8"), file=sys.stderr)
# Ensure / Generate tiles per image
# items.sort(key=lambda x: x['url'])
tiles = []

Loading…
Cancel
Save