diff options
Diffstat (limited to 'PyMca5/PyMcaCore/PyMcaBatchBuildOutput.py')
-rw-r--r-- | PyMca5/PyMcaCore/PyMcaBatchBuildOutput.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/PyMca5/PyMcaCore/PyMcaBatchBuildOutput.py b/PyMca5/PyMcaCore/PyMcaBatchBuildOutput.py index 497ced5..a68942e 100644 --- a/PyMca5/PyMcaCore/PyMcaBatchBuildOutput.py +++ b/PyMca5/PyMcaCore/PyMcaBatchBuildOutput.py @@ -131,13 +131,13 @@ class PyMcaBatchBuildOutput(object): def _mergeH5(self, parts, outfilename): shutil.copy(parts[0], outfilename) - with h5py.File(outfilename) as fout: + with h5py.File(outfilename, mode='a') as fout: for entry in NexusTools.getNXClassGroups(fout, '/', [u'NXentry']): for process in NexusTools.getNXClassGroups(fout, entry.name, [u'NXprocess']): for results in NexusTools.getNXClassGroups(fout, process.name, [u'NXcollection']): for dataout in NexusTools.getNXClassGroups(fout, results.name, [u'NXdata']): for part in parts[1:]: - with h5py.File(part) as fin: + with h5py.File(part, mode='r') as fin: try: datain = fin[dataout.name] except KeyError: |