diff --git a/ovos_workshop/skills/ovos.py b/ovos_workshop/skills/ovos.py index db30570b..b0303171 100644 --- a/ovos_workshop/skills/ovos.py +++ b/ovos_workshop/skills/ovos.py @@ -426,14 +426,16 @@ def _real_wait_response(self, is_cancel, validator, on_fail, num_retries): self._response = None return else: - if validator(response): - self._response = response - return - # catch user saying 'cancel' if is_cancel(response): self._response = None return + validated = validator(response) + # returns the validated value or the response + # (backwards compat) + if validated is not False and validated is not None: + self._response = response if validated is True else validated + return num_fails += 1 if 0 < num_retries < num_fails or self._response is not False: