mirror of
https://github.com/okalachev/flix.git
synced 2026-02-17 15:41:32 +00:00
Add log dir creation before log writing
This commit is contained in:
committed by
Oleg Kalachev
parent
9a9bd07251
commit
a6bad3a69b
@@ -43,6 +43,7 @@ records = [record for record in records if record[0] != 0]
|
|||||||
|
|
||||||
print(f'Received records: {len(records)}')
|
print(f'Received records: {len(records)}')
|
||||||
|
|
||||||
|
os.makedirs(f'{DIR}/log', exist_ok=True)
|
||||||
log = open(f'{DIR}/log/{datetime.datetime.now().isoformat()}.csv', 'wb')
|
log = open(f'{DIR}/log/{datetime.datetime.now().isoformat()}.csv', 'wb')
|
||||||
log.write(header.encode() + b'\n')
|
log.write(header.encode() + b'\n')
|
||||||
for record in records:
|
for record in records:
|
||||||
|
|||||||
Reference in New Issue
Block a user