From 2d7febb5f9fcf7a5686d23862c8f5a4d377a3d7a Mon Sep 17 00:00:00 2001 From: Gabriel Levcovitz Date: Thu, 18 Apr 2024 22:06:04 -0300 Subject: [PATCH] fix: sorting execution manager callbacks --- hathor/execution_manager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hathor/execution_manager.py b/hathor/execution_manager.py index 8d788e8b0..e3336430f 100644 --- a/hathor/execution_manager.py +++ b/hathor/execution_manager.py @@ -37,7 +37,7 @@ def register_on_crash_callback(self, callback: Callable[[], None], *, priority: def _run_on_crash_callbacks(self) -> None: """Run all registered on crash callbacks.""" - callbacks = sorted(self._on_crash_callbacks, reverse=True) + callbacks = sorted(self._on_crash_callbacks, reverse=True, key=lambda item: item[0]) for _, callback in callbacks: try: