[GRASS-git] [OSGeo/grass] 51fc3d: gunittest: Deduplicate output decoding code (#1539)

Vaclav Petras noreply at github.com
Mon May 10 17:40:03 PDT 2021


  Branch: refs/heads/master
  Home:   https://github.com/OSGeo/grass
  Commit: 51fc3d6276a4f7468e3add3e535f99ff5f21ee91
      https://github.com/OSGeo/grass/commit/51fc3d6276a4f7468e3add3e535f99ff5f21ee91
  Author: Vaclav Petras <wenzeslaus at gmail.com>
  Date:   2021-05-10 (Mon, 10 May 2021)

  Changed paths:
    M python/grass/gunittest/invoker.py

  Log Message:
  -----------
  gunittest: Deduplicate output decoding code (#1539)

* Resolves code duplication between stdout and stderr decoding.
* Removes while, use of indices, and control variable.
* Documents the operation (although not the motivation).
* Adds direct bytes.decode call with replace as a fallback.
* Uses UnicodeError instead of the bare except (original motivation for this change).




More information about the grass-commit mailing list