[GRASS-SVN] r46862 - grass/trunk/lib/python

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Jun 30 06:18:44 EDT 2011


Author: martinl
Date: 2011-06-30 03:18:44 -0700 (Thu, 30 Jun 2011)
New Revision: 46862

Modified:
   grass/trunk/lib/python/core.py
Log:
pythonlib: parser() check p.returncode


Modified: grass/trunk/lib/python/core.py
===================================================================
--- grass/trunk/lib/python/core.py	2011-06-30 10:01:50 UTC (rev 46861)
+++ grass/trunk/lib/python/core.py	2011-06-30 10:18:44 UTC (rev 46862)
@@ -447,8 +447,11 @@
     lines = s.splitlines()
     
     if not lines or lines[0].rstrip('\r\n') != "@ARGS_PARSED@":
-	sys.stdout.write(s)
-	sys.exit(1)
+        if p.returncode == 0:
+            sys.exit(0)
+        else:
+            sys.stdout.write(s)
+            sys.exit(1)
 
     return _parse_opts(lines[1:])
 



More information about the grass-commit mailing list