ADicksonLab / wepy

Weighted Ensemble simulation framework in Python
https://adicksonlab.github.io/wepy/index.html
MIT License
51 stars 20 forks source link

Errorless cleanup of un-initialized HDF5 files #115

Open salotz opened 1 year ago

salotz commented 1 year ago

As seen in the traceback of #112 if the HDF5Reporter is not initialized properly in a context manager you get a confusing AttributeError if there is no closed attribute. This should be handled more cleanly by either ensuring a meaningful closed is always present or first checking if this attribute exists.