[GRASS-SVN] r66036 - in grass/trunk: gui/wxpython/core lib/python/script

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Aug 26 14:24:29 PDT 2015


Author: annakrat
Date: 2015-08-26 14:24:29 -0700 (Wed, 26 Aug 2015)
New Revision: 66036

Modified:
   grass/trunk/gui/wxpython/core/toolboxes.py
   grass/trunk/lib/python/script/task.py
Log:
wxGUI: fix loading addons (with different locale) which are compiled for different version - use only byte strings

Modified: grass/trunk/gui/wxpython/core/toolboxes.py
===================================================================
--- grass/trunk/gui/wxpython/core/toolboxes.py	2015-08-26 21:16:59 UTC (rev 66035)
+++ grass/trunk/gui/wxpython/core/toolboxes.py	2015-08-26 21:24:29 UTC (rev 66036)
@@ -628,12 +628,6 @@
     try:
         task = gtask.parse_interface(module)
     except ScriptError as e:
-        e = _encode_string(e.value)
-        # for some reason this works well only if it is separate
-        sys.stderr.write("%s\n" % module)
-        sys.stderr.write("%s\n" % e)
-        return '', ''
-    except UnicodeDecodeError as e:
         sys.stderr.write("%s\n%s\n" % (module, e))
         return '', ''
 

Modified: grass/trunk/lib/python/script/task.py
===================================================================
--- grass/trunk/lib/python/script/task.py	2015-08-26 21:16:59 UTC (rev 66035)
+++ grass/trunk/lib/python/script/task.py	2015-08-26 21:24:29 UTC (rev 66036)
@@ -493,7 +493,7 @@
 
         if p.returncode != 0:
             raise ScriptError, _("Unable to fetch interface description for command '%(cmd)s'."
-                                 "\n\nDetails: %(det)s") % {'cmd': cmd, 'det': decode(cmderr)}
+                                 "\n\nDetails: %(det)s") % {'cmd': cmd, 'det': cmderr}
 
     except OSError as e:
         raise ScriptError, _("Unable to fetch interface description for command '%(cmd)s'."



More information about the grass-commit mailing list