[GRASS-SVN] r58885 - grass/trunk/lib/python/pygrass/modules/interface
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Feb 5 01:51:02 PST 2014
Author: zarch
Date: 2014-02-05 01:51:02 -0800 (Wed, 05 Feb 2014)
New Revision: 58885
Modified:
grass/trunk/lib/python/pygrass/modules/interface/module.py
Log:
Clarify the error message and add additional informations
Modified: grass/trunk/lib/python/pygrass/modules/interface/module.py
===================================================================
--- grass/trunk/lib/python/pygrass/modules/interface/module.py 2014-02-05 08:23:15 UTC (rev 58884)
+++ grass/trunk/lib/python/pygrass/modules/interface/module.py 2014-02-05 09:51:02 UTC (rev 58885)
@@ -242,8 +242,9 @@
# call the command with --interface-description
get_cmd_xml = subprocess.Popen([cmd, "--interface-description"],
stdout=subprocess.PIPE)
- except OSError:
- str_err = "Module %r not found, please check that the module exist"
+ except OSError as e:
+ print("OSError error({0}): {1}".format(e.errno, e.strerror))
+ str_err = "Error running: `%s --interface-description`."
raise GrassError(str_err % self.name)
# get the xml of the module
self.xml = get_cmd_xml.communicate()[0]
More information about the grass-commit
mailing list