From aac5a99c834d00edccc93a4b4b4af0092df573c2 Mon Sep 17 00:00:00 2001 From: Atharva Arya Date: Wed, 9 Oct 2024 14:20:03 +0530 Subject: [PATCH] check if object exists --- tardis/tests/fixtures/regression_data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tardis/tests/fixtures/regression_data.py b/tardis/tests/fixtures/regression_data.py index 455eb66fe75..f25aa86d96b 100644 --- a/tardis/tests/fixtures/regression_data.py +++ b/tardis/tests/fixtures/regression_data.py @@ -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 is not None and regression_data_instance.hdf_store_object.is_open: regression_data_instance.hdf_store_object.close()