浏览代码

pythonlib: vector_what() check for unicode type
(merge https://trac.osgeo.org/grass/changeset/44782 from relbr64)


git-svn-id: https://svn.osgeo.org/grass/grass/trunk@44785 15284696-431f-4ddb-bdfa-cd5b030d7da7

Martin Landa 14 年之前
父节点
当前提交
e5863a6d28
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      lib/python/vector.py

+ 2 - 2
lib/python/vector.py

@@ -262,8 +262,8 @@ def vector_what(name, coord, distance = 0.0):
     if os.environ.has_key("LC_ALL"):
         locale = os.environ["LC_ALL"]
         os.environ["LC_ALL"] = "C"
-    
-    if type(name) is types.StringType:
+
+    if type(name) in (types.StringType, types.UnicodeType):
         name_list = [name]
     else:
         name_list = name