comparison 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
comparison
equal deleted inserted replaced
3387:b3e7e3c49d8f 3388:cc288ec8ec1a
1451 del kwargs["with_data"] 1451 del kwargs["with_data"]
1452 1452
1453 if kwargs.pop("one_shot", False): 1453 if kwargs.pop("one_shot", False):
1454 self.removeCallback(callback_id) 1454 self.removeCallback(callback_id)
1455 1455
1456 return defer.maybeDeferred(callback, *args, **kwargs) 1456 return utils.asDeferred(callback, *args, **kwargs)
1457 1457
1458 # Menus management 1458 # Menus management
1459 1459
1460 def _getMenuCanonicalPath(self, path): 1460 def _getMenuCanonicalPath(self, path):
1461 """give canonical form of path 1461 """give canonical form of path