(self)
Make sure there is a current task for this service.
Make sure there is a current task for this service.
Make sure there is a current task for this service .
def ensure_current_task(self):
        """
        Make sure there is a current task for this service.
        """

        if self.current_task is None:
            raise Exception("No current task")
def ensure_current_task ( self ) : if self . current_task is None : raise Exception ( "No current task" )