瀏覽代碼

task.py: fix encoding again (https://trac.osgeo.org/grass/ticket/2827)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@67262 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 9 年之前
父節點
當前提交
78ee33bc1e
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      lib/python/script/task.py

+ 2 - 2
lib/python/script/task.py

@@ -32,7 +32,7 @@ if hasattr(etree, 'ParseError'):
 else:
     ETREE_EXCEPTIONS = (expat.ExpatError)
 
-from utils import decode, split
+from utils import encode, decode, split
 from core import *
 
 
@@ -200,7 +200,7 @@ class grassTask:
                     if not desc:
                         desc = p['description']
                     errorList.append(_("Parameter '%(name)s' (%(desc)s) is missing.") % \
-                                     {'name': p['name'], 'desc': desc.encode('utf-8')})
+                                     {'name': p['name'], 'desc': encode(desc)})
 
         return errorList