Преглед изворни кода

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:
 else:
     ETREE_EXCEPTIONS = (expat.ExpatError)
     ETREE_EXCEPTIONS = (expat.ExpatError)
 
 
-from utils import decode, split
+from utils import encode, decode, split
 from core import *
 from core import *
 
 
 
 
@@ -200,7 +200,7 @@ class grassTask:
                     if not desc:
                     if not desc:
                         desc = p['description']
                         desc = p['description']
                     errorList.append(_("Parameter '%(name)s' (%(desc)s) is missing.") % \
                     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
         return errorList