Fix trailing comma removal

This commit is contained in:
Hans5958 2022-04-08 10:14:49 +07:00
parent 33bda5f364
commit 4c4fb973f3

View file

@ -109,8 +109,8 @@
print("written "+submission.id+", submitted "+str(round(time.time()-submission.created_utc))+" seconds ago")
totalcount += 1
# Remove ,\n
outfile.seek(outfile.tell()-4, os.SEEK_SET)
# Remove last trailing comma
outfile.seek(outfile.tell()-3, os.SEEK_SET)
outfile.truncate()
outfile.write("\n]")