Commit 01e4ee25 authored by Stephane Glondu's avatar Stephane Glondu
Browse files

In web server, ignore trailing newline in election.json

parent d45c0844
......@@ -211,8 +211,11 @@ lwt election_table =
"-- registering " ^ subdir
);
lwt raw_election =
Lwt_io.chars_of_file params_fname |>
Lwt_stream.to_string
Lwt_io.lines_of_file params_fname |>
Lwt_stream.to_list |>
(fun x -> match_lwt x with
| [e] -> return e
| _ -> failwith "election.json is invalid")
in
lwt metadata =
let fname = path/"metadata.json" in
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment