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

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Jun 21 15:16:07 EDT 2010


Author: martinl
Date: 2010-06-21 19:16:07 +0000 (Mon, 21 Jun 2010)
New Revision: 42621

Modified:
   grass/trunk/lib/init/grass.py
Log:
os.uname() is not available on Windows, replaced by platform.node()

Modified: grass/trunk/lib/init/grass.py
===================================================================
--- grass/trunk/lib/init/grass.py	2010-06-21 11:01:15 UTC (rev 42620)
+++ grass/trunk/lib/init/grass.py	2010-06-21 19:16:07 UTC (rev 42621)
@@ -29,6 +29,7 @@
 import string
 import subprocess
 import re
+import platform
 
 # Variables substituted during build process
 # Set the GISBASE variable
@@ -886,7 +887,7 @@
 # Set the global grassrc file
 batch_job = os.getenv('GRASS_BATCH_JOB')
 if batch_job:
-    gisrcrc = os.path.join(grass_config_dir, "rc.%s" % os.uname()[1])
+    gisrcrc = os.path.join(grass_config_dir, "rc.%s" % platform.node())
     if not os.access(gisrcrc, os.R_OK):
 	gisrcrc = os.path.join(grass_config_dir, "rc")
 else:



More information about the grass-commit mailing list