[GRASS-SVN] r73253 - grass/trunk/gui/wxpython/lmgr

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Sep 4 07:05:02 PDT 2018


Author: annakrat
Date: 2018-09-04 07:05:02 -0700 (Tue, 04 Sep 2018)
New Revision: 73253

Modified:
   grass/trunk/gui/wxpython/lmgr/frame.py
Log:
wxGUI: platform decoding fixed for Python 3

Modified: grass/trunk/gui/wxpython/lmgr/frame.py
===================================================================
--- grass/trunk/gui/wxpython/lmgr/frame.py	2018-09-04 14:03:10 UTC (rev 73252)
+++ grass/trunk/gui/wxpython/lmgr/frame.py	2018-09-04 14:05:02 UTC (rev 73253)
@@ -42,6 +42,7 @@
     sys.path.append(os.path.join(globalvar.ETCDIR, "python"))
 
 from grass.script import core as grass
+from grass.script.utils import decode
 
 from core.gcmd import RunCommand, GError, GMessage, EncodeString
 from core.settings import UserSettings, GetDisplayVectSettings
@@ -1224,9 +1225,10 @@
             osgeo4w = ''
 
         self._gconsole.WriteCmdLog(_("System Info"))
-        # platform from UTF-8 conversion was added because of the Fedora 19 release
+        # platform decoding was added because of the Fedora 19 release
         # which has the name "Schrödinger’s cat" (umlaut and special ' character)
         # which appears in the platform.platform() string
+        platform_ = decode(platform.platform())
         self._gconsole.WriteLog("%s: %s\n"
                                 "%s: %s\n"
                                 "%s: %s\n"
@@ -1256,7 +1258,7 @@
                                                     'sqlite', '?'),
                                                 platform.python_version(),
                                                 wx.__version__,
-                                                _("Platform"), platform.platform().decode('utf8', 'replace'), osgeo4w),
+                                                _("Platform"), platform_, osgeo4w),
                                 notification=Notification.MAKE_VISIBLE)
         self._gconsole.WriteCmdLog(' ')
 



More information about the grass-commit mailing list