Add on_success to base command textual class
@@ -112,6 +112,8 @@ class CommandTextualGeneric(Command):
exception = self._stored_exception
self._stored_exception = None
super(CommandTextualGeneric, self)._set_exception_without_done(exception=exception)
+ if value and not self._is_done:
+ self.on_success()
super(CommandTextualGeneric, self.__class__)._is_done.fset(self, value)
@staticmethod
@@ -262,6 +264,14 @@ class CommandTextualGeneric(Command):
self._stored_exception),
levels_to_go_up=2)
+ def on_success(self):
+ """
+ Callback called by framework when command is just about to finish with success. Set ret is called
+
+ :return: None
+ """
+ pass
+
def on_timeout(self):
"""
Callback called by framework when timeout occurs.
