From b1926387cd37c7a427a836db2192a96cc5ac28a4 Mon Sep 17 00:00:00 2001 From: HelioGuilherme66 Date: Mon, 11 Nov 2024 01:26:56 +0000 Subject: [PATCH] Make progress error reporting more resistant in unit tests --- src/robotide/ui/progress.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/robotide/ui/progress.py b/src/robotide/ui/progress.py index f016b5a71..690d6dcb7 100644 --- a/src/robotide/ui/progress.py +++ b/src/robotide/ui/progress.py @@ -32,11 +32,13 @@ def notify(self): def finish(self): self._progressbar.Destroy() - context.LOG.report_parsing_errors() + if hasattr(context.LOG, 'report_parsing_errors'): + context.LOG.report_parsing_errors() def error(self, msg): self.finish() - context.LOG.error(msg) + if hasattr(context.LOG, 'error'): + context.LOG.error(msg) class LoadProgressObserver(ProgressObserver):