[GRASS-SVN] r65375 - grass/branches/releasebranch_7_0/lib/python/pygrass/modules/interface

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Jun 4 22:35:47 PDT 2015


Author: zarch
Date: 2015-06-04 22:35:47 -0700 (Thu, 04 Jun 2015)
New Revision: 65375

Modified:
   grass/branches/releasebranch_7_0/lib/python/pygrass/modules/interface/parameter.py
Log:
pygrass: backport r65337, Fix exception check

Modified: grass/branches/releasebranch_7_0/lib/python/pygrass/modules/interface/parameter.py
===================================================================
--- grass/branches/releasebranch_7_0/lib/python/pygrass/modules/interface/parameter.py	2015-06-05 05:33:55 UTC (rev 65374)
+++ grass/branches/releasebranch_7_0/lib/python/pygrass/modules/interface/parameter.py	2015-06-05 05:35:47 UTC (rev 65375)
@@ -22,9 +22,9 @@
     def raiseexcpet(exc, param, ptype, value):
         """Function to modifa the error message"""
         msg = req % (param.name, param.typedesc, ptype, value, exc.message)
-        if exc is ValueError:
+        if isinstance(exc, ValueError):
             raise ValueError(msg)
-        elif exc is TypeError:
+        elif isinstance(exc, TypeError):
             raise TypeError(msg)
         else:
             exc.message = msg



More information about the grass-commit mailing list