From 62a8b07a2264101fd6d9c201267966e3c5de0cd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Wed, 27 Jul 2016 02:17:39 +0200 Subject: Add other_only flag to stop_all_actions --- helpers/actions/stop_all_actions.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'helpers/actions') diff --git a/helpers/actions/stop_all_actions.py b/helpers/actions/stop_all_actions.py index f3fc5fb..4ea875a 100644 --- a/helpers/actions/stop_all_actions.py +++ b/helpers/actions/stop_all_actions.py @@ -1,5 +1,14 @@ -def run(action, **kwargs): - action.mapping.stop_all_running() +def run(action, key_start_time=0, other_only=False, **kwargs): + if other_only: + action.mapping.stop_all_running( + except_key=action.key, + key_start_time=key_start_time) + else: + action.mapping.stop_all_running() -def description(action, **kwargs): - return "stopping all actions" +def description(action, other_only=False, **kwargs): + message = "stopping all actions" + if other_only: + message += " except this key" + + return message -- cgit v1.2.3