[GRASS-SVN] r68465 - grass/trunk/lib/python/pygrass/modules/interface
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu May 19 05:33:33 PDT 2016
Author: zarch
Date: 2016-05-19 05:33:31 -0700 (Thu, 19 May 2016)
New Revision: 68465
Modified:
grass/trunk/lib/python/pygrass/modules/interface/parameter.py
Log:
pygrass:parameter fix string/unicode error
Modified: grass/trunk/lib/python/pygrass/modules/interface/parameter.py
===================================================================
--- grass/trunk/lib/python/pygrass/modules/interface/parameter.py 2016-05-19 02:49:02 UTC (rev 68464)
+++ grass/trunk/lib/python/pygrass/modules/interface/parameter.py 2016-05-19 12:33:31 UTC (rev 68465)
@@ -8,11 +8,6 @@
with_statement, print_function, unicode_literals)
import re
-try:
- from builtins import unicode
-except ImportError:
- unicode = str
-
from grass.pygrass.modules.interface.docstring import docstring_property
from grass.pygrass.modules.interface.read import GETTYPE, element2dict, DOC
@@ -23,6 +18,7 @@
"""
must_val = 'The Parameter <%s>, must be one of the following values: %r'
req = 'The Parameter <%s>, require: %s, get: %s instead: %r\n%s'
+ string = (type(b''), type(u''))
def raiseexcpet(exc, param, ptype, value):
"""Function to modifa the error message"""
@@ -37,7 +33,6 @@
def check_string(value):
"""Function to check that a string parameter is already a string"""
- string = (str, unicode)
if param.type in string:
if type(value) in (int, float):
value = str(value)
More information about the grass-commit
mailing list