Skip to content

Commit

Permalink
Updating writer .
Browse files Browse the repository at this point in the history
  • Loading branch information
RubelMozumder committed Nov 19, 2023
1 parent 626ff06 commit 4c7fc16
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions pynxtools/dataconverter/writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,10 +330,13 @@ def get_in_memory_obj(self):
Write in nexus in-memory file obj and return that file object.
"""

if self.write_in_memory:
self._process_data_into_hdf5()
else:
raise ValueError(f"The write_in_memory variable is False Writer"
f"class initialization.")
try:
if self.write_in_memory:
self._process_data_into_hdf5()
else:
raise ValueError(f"The write_in_memory variable is False Writer"
f"class initialization.")
except Exception as e:
self.output_nexus.close()
raise e
return self.output_nexus

0 comments on commit 4c7fc16

Please sign in to comment.