Closed mdcfe closed 7 years ago
This will append the new meritocracy json to the old one, similar to the broken voters json issue. Why not just open it once in w
mode?
@davidak rescind review?
``r+'' Open for reading and writing. The stream is positioned at the beginning of the file.
That doesn't sound good... Why not just use "r"
and "w"
?
Why not just w
? We never read from it.
I think r+
would work if we called truncate before writing to it.
And yes, this won't append to the file, but it will cause problems. Example:
Write 1: abc Write 2: de
Result: dec
That's because we don't truncate the file, so old data gets left behind.
@PlasmaPower I mean use "r"
and "w"
in a general sense.
Oops, I'll amend that now. Forgot about file modes 😟
:ok_woman: PR passed with a vote of 17 for and 0 against, a weighted total of 16.5 and a threshold of 6.5, and a current meritocracy review.
See merge-commit 2596dd8c0be777f8807868e179fc6176d58e5ba5 for more details.
This crashes chaos for me with TypeError: Object of type 'set' is not JSON serializable
Looks like we need to turn it into a list first. Fixing.
Will be dropped in the root of the web server when generated.