Django

Code

Changeset 9237

Show
Ignore:
Timestamp:
10/20/08 23:32:02 (3 months ago)
Author:
jbronn
Message:

Fixed #9361 -- thanks to Guillaume for the bug report and patch.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/contrib/gis/gdal/geometries.py

    r8219 r9237  
    4343from binascii import a2b_hex 
    4444from ctypes import byref, string_at, c_char_p, c_double, c_ubyte, c_void_p 
    45 from types import UnicodeType 
    4645 
    4746# Getting GDAL prerequisites 
     
    8382        if str_instance: 
    8483            # Checking if unicode 
    85             if isinstance(geom_input, UnicodeType): 
     84            if isinstance(geom_input, unicode): 
    8685                # Encoding to ASCII, WKT or HEX doesn't need any more. 
    87                 geo_input = geo_input.encode('ascii') 
     86                geom_input = geom_input.encode('ascii') 
    8887 
    8988            wkt_m = wkt_regex.match(geom_input)