mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-13 07:47:14 +03:00
Fixes generation of market CSV files
This commit is contained in:
parent
a25d22123b
commit
ee588e2f1f
@ -55,6 +55,6 @@ def export(data, kind=COMMODITY_DEFAULT, filename=None):
|
||||
line = sep.join([line, str(int(commodity['meanPrice'])), str(commodity['id']), data['timestamp'] + '\n'])
|
||||
else:
|
||||
line = sep.join([line, data['timestamp'] + '\n'])
|
||||
h.write(line.encode('utf-8'))
|
||||
h.write(line)
|
||||
|
||||
h.close()
|
||||
|
@ -447,7 +447,7 @@ def fixup(data):
|
||||
if not commodity_map:
|
||||
# Lazily populate
|
||||
for f in ['commodity.csv', 'rare_commodity.csv']:
|
||||
with open(join(config.respath, f), 'rb') as csvfile:
|
||||
with open(join(config.respath, f), 'r') as csvfile:
|
||||
reader = csv.DictReader(csvfile)
|
||||
for row in reader:
|
||||
commodity_map[row['symbol']] = (row['category'], row['name'])
|
||||
|
Loading…
x
Reference in New Issue
Block a user