def reset(self):
        """Reset a task.

        Allows a task to be started again, clears the ``return_values``.

        Raises:
            RuntimeError: If the task has not been stopped.
        """
        if self._status is not TaskStatus.STOPPED:
            raise RuntimeError("Cannot reset %s in state %s" %
                               (self, self._status))
        self._reset()
        self.return_values = {}
        self._status = TaskStatus.IDLE
def reset ( self ) : if self . _status is not TaskStatus . STOPPED : raise RuntimeError ( "Cannot reset %s in state %s" % ( self , self . _status ) ) self . _reset ( ) self . return_values = { } self . _status = TaskStatus . IDLE
Reset a task.

        Allows a task to be started again, clears the ``return_values``.

        Raises:
            RuntimeError: If the task has not been stopped.