Skip to content

Commit

Permalink
check if object exists
Browse files Browse the repository at this point in the history
  • Loading branch information
atharva-2001 committed Oct 9, 2024
1 parent fe9edb1 commit a10a9f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tardis/tests/fixtures/regression_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,5 +171,5 @@ def sync_hdf_store(self, tardis_module, update_fname=True):
def regression_data(request):
regression_data_instance = RegressionData(request)
yield regression_data_instance
if regression_data_instance.hdf_store_object.is_open:
if regression_data_instance.hdf_store_object and regression_data_instance.hdf_store_object.is_open:
regression_data_instance.hdf_store_object.close()

0 comments on commit a10a9f8

Please sign in to comment.