Browse Source

os.uname() is not available on Windows, replaced by platform.node()

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@42621 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 15 năm trước cách đây
mục cha
commit
e01006519b
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  1. 2 1
      lib/init/grass.py

+ 2 - 1
lib/init/grass.py

@@ -29,6 +29,7 @@ import atexit
 import string
 import subprocess
 import re
+import platform
 
 # Variables substituted during build process
 # Set the GISBASE variable
@@ -886,7 +887,7 @@ os.environ['GIS_LOCK'] = gis_lock
 # 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: