diff sat/core/sat_main.py @ 3388:cc288ec8ec1a

core: use utils.asDeferred for `launchCallback` so coroutines can be used
author Goffi <goffi@goffi.org>
date Thu, 12 Nov 2020 14:53:15 +0100
parents 2157880ba3b4
children be6d91572633
line wrap: on
line diff
--- a/sat/core/sat_main.py	Thu Nov 12 14:53:15 2020 +0100
+++ b/sat/core/sat_main.py	Thu Nov 12 14:53:15 2020 +0100
@@ -1453,7 +1453,7 @@
         if kwargs.pop("one_shot", False):
             self.removeCallback(callback_id)
 
-        return defer.maybeDeferred(callback, *args, **kwargs)
+        return utils.asDeferred(callback, *args, **kwargs)
 
     # Menus management