Skip to content

Commit 2341a10

Browse files
committed
address a lint issue
1 parent a84d30b commit 2341a10

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

mlos_bench/mlos_bench/tests/storage/sql/fixtures.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,11 @@ def _create_storage_from_test_server_info(
120120
global_configs=[json.dumps(global_config)],
121121
)
122122
assert isinstance(storage, SqlStorage)
123-
yield storage
124-
# Cleanup the storage on return
125-
storage._reset_schema(force=True) # pylint: disable=protected-access
123+
try:
124+
yield storage
125+
finally:
126+
# Cleanup the storage on return
127+
storage._reset_schema(force=True) # pylint: disable=protected-access
126128

127129

128130
@pytest.fixture(scope="function")

0 commit comments

Comments
 (0)