[GRASS-git] [OSGeo/grass-addons] d30861: r.boxplot: preserve active MASK when zonal run exi...

Valyrian-Code noreply at github.com
Tue Jun 16 06:37:33 PDT 2026


  Branch: refs/heads/grass8
  Home:   https://github.com/OSGeo/grass-addons
  Commit: d30861cc8d2ef03b3acb6d223d69abe77f5c032b
      https://github.com/OSGeo/grass-addons/commit/d30861cc8d2ef03b3acb6d223d69abe77f5c032b
  Author: Rajveer* <irajveer.bishnoi2310 at gmail.com>
  Date:   2026-06-16 (Tue, 16 Jun 2026)

  Changed paths:
    M src/raster/r.boxplot/r.boxplot.py

  Log Message:
  -----------
  r.boxplot: preserve active MASK when zonal run exits with an error (#1701)

* r.boxplot: preserve active MASK when zonal run exits with an error

Track the backup mask name in a module-level variable instead of in
clean_maps, and restore it from cleanup() so MASK survives crashes
during the zonal statistics computation.

Refs #1696

* r.boxplot: always remove the temporary zonal mask and clear a leftover MASK before restore

Addresses @ecodiv's review on #1701. compute_outliers() creates a temporary
mask for the zonal outlier path; if a step in between raised, that mask was
left active and cleanup()'s restore of the original MASK failed because a MASK
already existed.

Wrap the temporary-mask block in try/finally so the mask is always removed,
and in restore_mask_backup() remove a leftover MASK (one r.boxplot created
itself) before renaming the backup back into place.

---------

Co-authored-by: Paulo van Breugel <paulo at ecodiv.earth>



To unsubscribe from these emails, change your notification settings at https://github.com/OSGeo/grass-addons/settings/notifications


More information about the grass-commit mailing list