fixed has_key to in

main
psycodad 8 months ago
parent 8b717912a6
commit 8fd1d24e4d

@ -149,7 +149,9 @@ if __name__ == '__main__':
fh = open(filename, 'r')
csv_data = csv.DictReader(fh)
for line in csv_data:
if not data.has_key(line['pair']):
if not 'pair' in data:
# ^py3 way of doing things, py2:
#if not data.has_key(line['pair']):
data[line['pair']] = []
data[line['pair']].append(line)

Loading…
Cancel
Save