[GRASS-SVN] r52346 - grass/branches/develbranch_6/lib/python
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Jul 8 01:25:34 PDT 2012
Author: mmetz
Date: 2012-07-08 01:25:34 -0700 (Sun, 08 Jul 2012)
New Revision: 52346
Modified:
grass/branches/develbranch_6/lib/python/task.py
Log:
python lib: 'Unable to fetch interface description' is only true if g.parser exits with EXIT_FAILURE
Modified: grass/branches/develbranch_6/lib/python/task.py
===================================================================
--- grass/branches/develbranch_6/lib/python/task.py 2012-07-08 08:25:06 UTC (rev 52345)
+++ grass/branches/develbranch_6/lib/python/task.py 2012-07-08 08:25:34 UTC (rev 52346)
@@ -437,9 +437,9 @@
else:
args = [cmd, '--interface-description']
- cmdout, cmderr = Popen(args, stdout = PIPE,
- stderr = PIPE).communicate()
- if cmderr:
+ p = Popen(args, stdout = PIPE, stderr = PIPE)
+ cmdout, cmderr = p.communicate()
+ if p.returncode != 0:
raise ScriptError, _("Unable to fetch interface description for command '%(cmd)s'."
"\n\nDetails: %(det)s") % { 'cmd' : cmd, 'det' : decode(cmderr) }
except OSError, e:
More information about the grass-commit
mailing list