Skip to content

Commit

Permalink
CR: cleanup in a newly finally block
Browse files Browse the repository at this point in the history
  • Loading branch information
roi-granulate committed Sep 4, 2024
1 parent e6c443b commit 4a27c69
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gprofiler/profilers/python_ebpf.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,11 @@ def test(self) -> None:
poll_process(process, self._POLL_TIMEOUT, self._profiler_state.stop_event)
except TimeoutError:
process.kill()
self._staticx_cleanup()
raise
else:
self._staticx_cleanup()
self._check_output(process, self.output_path)
finally:
self._staticx_cleanup()

def start(self) -> None:
logger.info("Starting profiling of Python processes with PyPerf")
Expand Down

0 comments on commit 4a27c69

Please sign in to comment.