Skip to content

Commit

Permalink
add missing method for nothing as output
Browse files Browse the repository at this point in the history
  • Loading branch information
olivierlabayle committed Jul 25, 2024
1 parent f4620ef commit 1fe317a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/outputs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
#####  JSON OUTPUT ####
#####################################################################

write_json(filename::Nothing, results) = 0

write_json(filename, results) = open(filename, "w") do io
JSON.print(io, TMLE.to_dict(results))
end
Expand Down Expand Up @@ -36,7 +38,9 @@ end
#####  HDF5 OUTPUT ####
#####################################################################

write_hdf5(filename, results)= jldopen(io -> io["results"] = results, filename, "w")
write_hdf5(filename::Nothing, results) = 0

write_hdf5(filename, results) = jldopen(io -> io["results"] = results, filename, "w")

update_hdf5(filename::Nothing, results) = 0

Expand All @@ -52,6 +56,8 @@ end
#####  JLS OUTPUT ####
#####################################################################

write_jls(filename::Nothing, results) = 0

write_jls(filename, results) = serialize(filename, results)

update_jls(filename::Nothing, results) = 0
Expand Down

0 comments on commit 1fe317a

Please sign in to comment.