[py3] Replaced basestring by six.string_types.

This commit is contained in:
Aymeric Augustin 2012-07-20 14:22:00 +02:00
parent cacd845996
commit 3cb2457f46
73 changed files with 230 additions and 150 deletions

View file

@ -54,7 +54,7 @@ class SpatialReference(GDALBase):
buf = c_char_p('')
srs_type = 'user'
if isinstance(srs_input, basestring):
if isinstance(srs_input, six.string_types):
# Encoding to ASCII if unicode passed in.
if isinstance(srs_input, unicode):
srs_input = srs_input.encode('ascii')
@ -135,7 +135,7 @@ class SpatialReference(GDALBase):
The attribute value for the given target node (e.g. 'PROJCS'). The index
keyword specifies an index of the child node to return.
"""
if not isinstance(target, basestring) or not isinstance(index, int):
if not isinstance(target, six.string_types) or not isinstance(index, int):
raise TypeError
return capi.get_attr_value(self.ptr, target, index)