[GRASS-git] [OSGeo/grass] 304a5a: pygrass: Remove usage of bare except (#1544)

Vaclav Petras noreply at github.com
Mon May 10 17:42:28 PDT 2021

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

  Changed paths:
    M python/grass/pygrass/modules/interface/module.py
    M python/grass/pygrass/raster/history.py
    M python/grass/pygrass/rpc/__init__.py
    M python/grass/pygrass/vector/abstract.py
    M python/grass/pygrass/vector/table.py

  Log Message:
  pygrass: Remove usage of bare except (#1544)

* Plain try-finally is how re-raising is expressed according to the doc:
  'If there is a saved exception it is re-raised at the end of the finally clause.'
* datetime.strptime() produces ValueError.
* Only ImportError for import statement.

More information about the grass-commit mailing list