From 5c803b120e25a34b52b34a4d6d0c3ff39db2bff8 Mon Sep 17 00:00:00 2001 From: Nicolas Godet <39594821+nicogodet@users.noreply.github.com> Date: Thu, 24 Oct 2024 14:39:19 +0200 Subject: [PATCH] Report GRASS warnings with pushWarning instead of reportError and check translated warning or error --- python/plugins/grassprovider/grass_utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python/plugins/grassprovider/grass_utils.py b/python/plugins/grassprovider/grass_utils.py index 7d98aee3ee37..37c784c09d7d 100644 --- a/python/plugins/grassprovider/grass_utils.py +++ b/python/plugins/grassprovider/grass_utils.py @@ -463,7 +463,9 @@ def readline_with_recover(stdout): if 'r.out' in line or 'v.out' in line: grassOutDone = True loglines.append(line) - if any([l in line for l in ['WARNING', 'ERROR']]): + if any([l in line for l in ['WARNING', GrassUtils.tr('WARNING')]]): + feedback.pushWarning(line.strip()) + elif any([l in line for l in ['ERROR', GrassUtils.tr('ERROR')]]): feedback.reportError(line.strip()) elif 'Segmentation fault' in line: feedback.reportError(line.strip())