Browse Source

Clarify the error message and add additional informations

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@58885 15284696-431f-4ddb-bdfa-cd5b030d7da7
Pietro Zambelli 11 years ago
parent
commit
08a22ae624
1 changed files with 3 additions and 2 deletions
  1. 3 2
      lib/python/pygrass/modules/interface/module.py

+ 3 - 2
lib/python/pygrass/modules/interface/module.py

@@ -242,8 +242,9 @@ class Module(object):
             # 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]