[GRASS-SVN] r53743 - grass/trunk/lib/init

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Nov 9 05:21:58 PST 2012


Author: martinl
Date: 2012-11-09 05:21:58 -0800 (Fri, 09 Nov 2012)
New Revision: 53743

Modified:
   grass/trunk/lib/init/grass.py
Log:
grass.py: don't report errors when launching manpath

Modified: grass/trunk/lib/init/grass.py
===================================================================
--- grass/trunk/lib/init/grass.py	2012-11-09 11:28:03 UTC (rev 53742)
+++ grass/trunk/lib/init/grass.py	2012-11-09 13:21:58 UTC (rev 53743)
@@ -15,7 +15,7 @@
 #               command line options for setting the GISDBASE, LOCATION,
 #               and/or MAPSET. Finally it starts GRASS with the appropriate user
 #               interface and cleans up after it is finished.
-# COPYRIGHT:    (C) 2000-2011 by the GRASS Development Team
+# COPYRIGHT:    (C) 2000-2012 by the GRASS Development Team
 #
 #               This program is free software under the GNU General
 #               Public License (>=v2). Read the file COPYING that
@@ -343,7 +343,9 @@
         path_prepend(grass_man_path, 'MANPATH')
     else:
         try:
-            p = Popen(['manpath'], stdout = subprocess.PIPE)
+            nul = open(os.devnull, 'w')
+            p = Popen(['manpath'], stdout = subprocess.PIPE, stderr = nul)
+            nul.close()
             s = p.stdout.read()
             p.wait()
             sys_man_path = s.strip()



More information about the grass-commit mailing list