[GRASS-SVN] r65337 - grass/trunk/lib/python/pygrass/modules/interface

svn_grass at osgeo.org svn_grass at osgeo.org
Thu May 28 09:07:48 PDT 2015


Author: zarch
Date: 2015-05-28 09:07:48 -0700 (Thu, 28 May 2015)
New Revision: 65337

Modified:
   grass/trunk/lib/python/pygrass/modules/interface/parameter.py
Log:
pygrass: Fix exception check

Modified: grass/trunk/lib/python/pygrass/modules/interface/parameter.py
===================================================================
--- grass/trunk/lib/python/pygrass/modules/interface/parameter.py	2015-05-28 15:58:21 UTC (rev 65336)
+++ grass/trunk/lib/python/pygrass/modules/interface/parameter.py	2015-05-28 16:07:48 UTC (rev 65337)
@@ -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