Compare commits

...

2 Commits

Author SHA1 Message Date
Jeff Yates f02c088201 fixed missing end 2020-11-22 15:37:46 -05:00
Jeff Yates a0abcac6e0 error handling for writing json 2020-11-22 15:37:03 -05:00
1 changed files with 8 additions and 4 deletions

View File

@ -47,10 +47,14 @@ end
# output - a hash containing all of our output
#This method converts the output hash to JSON and writes it to "output.json"
def write_output_json (output, filename)
pp output
outfile = File.open(filename,'w')
outfile.write(output.to_json)
outfile.close
begin
outfile = File.open(filename,'w')
outfile.write(output.to_json)
outfile.close
rescue
pp output
abort
end
end
def write_output_csv (output, filename)