summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Bronn <jbronn@gmail.com>2008-10-21 04:45:55 +0000
committerJustin Bronn <jbronn@gmail.com>2008-10-21 04:45:55 +0000
commit663a2848170e97500a3ab86dc5d7413aaa93fefe (patch)
treec66bb13554f417336bda0adadab3fe3922352e35
parent3c5688d4e0fd3701a601bb4974879d93223db3fe (diff)
Fixed #9361 -- thanks to Guillaume for the bug report and patch.
Backport of r9237 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9238 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--django/contrib/gis/gdal/geometries.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/django/contrib/gis/gdal/geometries.py b/django/contrib/gis/gdal/geometries.py
index ee0ec17559..b6d45304da 100644
--- a/django/contrib/gis/gdal/geometries.py
+++ b/django/contrib/gis/gdal/geometries.py
@@ -42,7 +42,6 @@
import re, sys
from binascii import a2b_hex
from ctypes import byref, string_at, c_char_p, c_double, c_ubyte, c_void_p
-from types import UnicodeType
# Getting GDAL prerequisites
from django.contrib.gis.gdal.envelope import Envelope, OGREnvelope
@@ -82,9 +81,9 @@ class OGRGeometry(object):
# Constructing the geometry,
if str_instance:
# Checking if unicode
- if isinstance(geom_input, UnicodeType):
+ if isinstance(geom_input, unicode):
# Encoding to ASCII, WKT or HEX doesn't need any more.
- geo_input = geo_input.encode('ascii')
+ geom_input = geom_input.encode('ascii')
wkt_m = wkt_regex.match(geom_input)
json_m = json_regex.match(geom_input)