瀏覽代碼

wxGUI: platform decoding fixed for Python 3

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@73253 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 6 年之前
父節點
當前提交
2073496595
共有 1 個文件被更改,包括 4 次插入2 次删除
  1. 4 2
      gui/wxpython/lmgr/frame.py

+ 4 - 2
gui/wxpython/lmgr/frame.py

@@ -42,6 +42,7 @@ if os.path.join(globalvar.ETCDIR, "python") not in sys.path:
     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 @@ class GMFrame(wx.Frame):
             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 @@ class GMFrame(wx.Frame):
                                                     'sqlite', '?'),
                                                 platform.python_version(),
                                                 wx.__version__,
-                                                _("Platform"), platform.platform().decode('utf8', 'replace'), osgeo4w),
+                                                _("Platform"), platform_, osgeo4w),
                                 notification=Notification.MAKE_VISIBLE)
         self._gconsole.WriteCmdLog(' ')