Skip to content

Commit 0ad6324

Browse files
committed
correct "Keyword failed" with empty last_fail_message
1 parent 61a7fc5 commit 0ad6324

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

robotcode/debugger/debugger.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -632,19 +632,21 @@ def start_keyword(self, name: str, attributes: Dict[str, Any]) -> None:
632632

633633
entry = self.add_stackframe_entry(kwname, type, source, line_no)
634634

635-
if self.debug:
636-
if entry.source:
637-
self.process_start_state(entry.source, entry.line, entry.type, status)
635+
if self.debug and entry.source:
636+
self.process_start_state(entry.source, entry.line, entry.type, status)
638637

639-
self.wait_for_running()
638+
self.wait_for_running()
640639

641640
def end_keyword(self, name: str, attributes: Dict[str, Any]) -> None:
642641
if self.debug:
643642
status = attributes.get("status", "")
644643

645644
if status != "NOT RUN":
646645
self.process_end_state(
647-
status, "failed_keyword", "Keyword failed.", f"Keyword failed: {self.last_fail_message}"
646+
status,
647+
"failed_keyword",
648+
"Keyword failed.",
649+
f"Keyword failed: {self.last_fail_message}" if self.last_fail_message else "Keyword failed.",
648650
)
649651

650652
if self.stack_frames:

0 commit comments

Comments
 (0)