From 47afd7453dd8b02b27a7d2158e7490991b9f033b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pekka=20Kl=C3=A4rck?= Date: Thu, 2 Nov 2023 18:49:25 +0200 Subject: [PATCH] Add WHILE on_limit to listener v2 attributes. Fixes #4924. --- .../src/ExtendingRobotFramework/ListenerInterface.rst | 2 +- src/robot/output/listeners.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/userguide/src/ExtendingRobotFramework/ListenerInterface.rst b/doc/userguide/src/ExtendingRobotFramework/ListenerInterface.rst index abd55093549..4db6288b67c 100644 --- a/doc/userguide/src/ExtendingRobotFramework/ListenerInterface.rst +++ b/doc/userguide/src/ExtendingRobotFramework/ListenerInterface.rst @@ -270,7 +270,7 @@ it. If that is needed, `listener version 3`_ can be used instead. | | | * `condition`: The looping condition. | | | | * `limit`: The maximum iteration limit. | | | | * `on_limit`: What to do if the limit is exceeded. | - | | | Valid values are `pass` and `fail`. New in RF 6.1. | + | | | Valid values are `pass` and `fail`. New in RF 7.0. | | | | * `on_limit_message`: The custom error raised when the | | | | limit of the WHILE loop is reached. New in RF 6.1. | | | | | diff --git a/src/robot/output/listeners.py b/src/robot/output/listeners.py index 98ac4de6dfd..be1292f589a 100644 --- a/src/robot/output/listeners.py +++ b/src/robot/output/listeners.py @@ -327,13 +327,13 @@ def end_for_iteration(self, data, result): def start_while(self, data, result): attrs = self._attrs(data, result, condition=result.condition, - limit=result.limit, + limit=result.limit, on_limit=result.on_limit, on_limit_message=result.on_limit_message) self._start_kw(result._log_name, attrs) def end_while(self, data, result): attrs = self._attrs(data, result, condition=result.condition, - limit=result.limit, + limit=result.limit, on_limit=result.on_limit, on_limit_message=result.on_limit_message, end=True) self._end_kw(result._log_name, attrs)