From e152877576186ea2cb2a0bc34f7b32f060a3ad69 Mon Sep 17 00:00:00 2001 From: "marvin.steinke" Date: Mon, 30 Sep 2024 17:59:35 +0200 Subject: [PATCH] always finalize microgrid --- vessim/cosim.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/vessim/cosim.py b/vessim/cosim.py index d6d7131..c858ee6 100644 --- a/vessim/cosim.py +++ b/vessim/cosim.py @@ -157,10 +157,9 @@ def run( disable_rt_warnings(behind_threshold) try: self.world.run(until=until, rt_factor=rt_factor, print_progress=print_progress) - except Exception: + finally: for microgrid in self.microgrids: microgrid.finalize() - raise class _GridSim(mosaik_api_v3.Simulator):