Skip to content

Commit

Permalink
root: overwrite an existing file (closes #26)
Browse files Browse the repository at this point in the history
* FIX previous 'UPDATE' option which causes problems when the hepdata-converter-ws package passes the name of an existing temporary output file.

Signed-off-by: Graeme Watt <[email protected]>
  • Loading branch information
GraemeWatt committed Jul 26, 2016
1 parent a6511a2 commit 53132e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hepdata_converter/writers/root_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ def _write_table(self, data_out, table):
def _prepare_outputs(self, data_out, outputs):
if isinstance(data_out, (str, unicode)):
self.file_emulation = True
outputs.append(ROOTModule.TFile.Open(data_out, 'UPDATE'))
outputs.append(ROOTModule.TFile.Open(data_out, 'RECREATE'))
# multiple tables - require directory
elif isinstance(data_out, ROOTModule.TFile):
outputs.append(data_out)
Expand Down

0 comments on commit 53132e8

Please sign in to comment.