Browse Source

grass.py: don't report errors when launching manpath

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@53743 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 12 years ago
parent
commit
c5801fc993
1 changed files with 4 additions and 2 deletions
  1. 4 2
      lib/init/grass.py

+ 4 - 2
lib/init/grass.py

@@ -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 @@ def set_paths():
         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()