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

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Jan 30 04:49:34 PST 2015


Author: glynn
Date: 2015-01-30 04:49:34 -0800 (Fri, 30 Jan 2015)
New Revision: 64364

Modified:
   grass/trunk/lib/init/grass.py
Log:
Revert r64335


Modified: grass/trunk/lib/init/grass.py
===================================================================
--- grass/trunk/lib/init/grass.py	2015-01-30 12:05:04 UTC (rev 64363)
+++ grass/trunk/lib/init/grass.py	2015-01-30 12:49:34 UTC (rev 64364)
@@ -70,9 +70,7 @@
 grass_gui = None
 exit_grass = None
 force_gislock_removal = None
-encoding = None
 
-
 def warning(text):
     sys.stderr.write(_("WARNING") + ': ' + text + os.linesep)
 
@@ -778,7 +776,7 @@
     import locale
     
     language = 'None' # Such string sometimes is present in wx file
-    global encoding
+    encoding = None
     
     # Override value is stored in wxGUI preferences file.
     # As it's the only thing required, we'll just grep it out.
@@ -1126,7 +1124,7 @@
     else:
         f.write("PS1='GRASS %s (%s):\w > '\n" % (grass_version, location_name))
     
-    f.write(("""grass_prompt() {
+    f.write("""grass_prompt() {
 	LOCATION="`g.gisenv get=GISDBASE,LOCATION_NAME,MAPSET separator='/'`"
 	if test -d "$LOCATION/grid3/G3D_MASK" && test -f "$LOCATION/cell/MASK" ; then
 		echo [%s]
@@ -1138,7 +1136,7 @@
 }
 PROMPT_COMMAND=grass_prompt\n""" % (_("2D and 3D raster MASKs present"),
                                     _("Raster MASK present"),
-                                    _("3D raster MASK present"))).encode(encoding))
+                                    _("3D raster MASK present")))
 
     # read environmental variables
     path = os.path.join(userhome, ".grass.bashrc") # left for backward compatibility



More information about the grass-commit mailing list