- @failtrap
- def finish(self):
- """ Sets the RM to state FINISHED.
-
- The FINISHED state is different from STOPPED state in that it
- should not be directly invoked by the user.
- STOPPED indicates that the user interrupted the RM, FINISHED means
- that the RM concluded normally the actions it was supposed to perform.
-
- This method should not be overriden directly. Specific functionality
- should be added in the do_finish method.
-
- """
- with self._release_lock:
- if self._state != ResourceState.RELEASED:
- self.do_finish()
-