Selaa lähdekoodia

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 vuotta sitten
vanhempi
commit
e5863a6d28
1 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  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