[GRASS-git] [OSGeo/grass] 4f9f82: grass.script: Fallback to print when g.message fai...
Vaclav Petras
noreply at github.com
Tue Jun 17 07:11:12 PDT 2025
Branch: refs/heads/main
Home: https://github.com/OSGeo/grass
Commit: 4f9f828860996a86f1dda3b6b0dbd4e93b1bade4
https://github.com/OSGeo/grass/commit/4f9f828860996a86f1dda3b6b0dbd4e93b1bade4
Author: Vaclav Petras <wenzeslaus at gmail.com>
Date: 2025-06-17 (Tue, 17 Jun 2025)
Changed paths:
M python/grass/script/core.py
Log Message:
-----------
grass.script: Fallback to print when g.message fails (#5849)
A certain situation on Windows described in #5717 produces 'OSError: Cannot find the executable g.message' which is missing the original message. While such message is an indication of a deeper issue, the traceback misses the original message. This fallback approach show the message as the function was asked to do even when the subprocess had issues. It attaches the exception which may be confusing, but also may be quite helpful to understand the overall situation (which may not be related to the message itself).
When g.message is asked to print an error message with -e, it returns a non-zero return code. So, the error code really needs to be still ignored because printing an error results in a non-zero return code (likely to facilitate shell scripting).
To unsubscribe from these emails, change your notification settings at https://github.com/OSGeo/grass/settings/notifications
More information about the grass-commit
mailing list