From ecab10a6d6a1bdc893c0ad17405f9a7323ce9e1d Mon Sep 17 00:00:00 2001 From: Joshua Harlow Date: Sat, 25 Jul 2015 16:55:51 -0700 Subject: [PATCH] Use the action engine '_check' helper method Change-Id: I0822bbf1caf28a8fd2b4e914643aca61ae0c7f45 --- taskflow/engines/action_engine/engine.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/taskflow/engines/action_engine/engine.py b/taskflow/engines/action_engine/engine.py index ef557f93..a4f55f47 100644 --- a/taskflow/engines/action_engine/engine.py +++ b/taskflow/engines/action_engine/engine.py @@ -294,10 +294,7 @@ class ActionEngine(base.Engine): @fasteners.locked def reset(self): - if not self._storage_ensured: - raise exc.InvalidState("Can not reset an engine" - " which has not has its storage" - " populated") + self._check('reset', True, True) # This transitions *all* contained atoms back into the PENDING state # with an intention to EXECUTE (or dies trying to do that) and then # changes the state of the flow to PENDING so that it can then run...