From 9e0a10ba77ad1737c4aaf49e5d4b4380f912bc0e Mon Sep 17 00:00:00 2001 From: Aymeric Augustin Date: Sun, 5 Aug 2012 14:46:18 +0200 Subject: [PATCH] [py3] Minor fix in django.contrib.gis. --- django/contrib/gis/gdal/geometries.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/django/contrib/gis/gdal/geometries.py b/django/contrib/gis/gdal/geometries.py index d752104e0a..373ece777d 100644 --- a/django/contrib/gis/gdal/geometries.py +++ b/django/contrib/gis/gdal/geometries.py @@ -40,7 +40,7 @@ """ # Python library requisites. import sys -from binascii import a2b_hex +from binascii import a2b_hex, b2a_hex from ctypes import byref, string_at, c_char_p, c_double, c_ubyte, c_void_p # Getting GDAL prerequisites @@ -322,8 +322,7 @@ class OGRGeometry(GDALBase): @property def hex(self): "Returns the hexadecimal representation of the WKB (a string)." - return str(self.wkb).encode('hex').upper() - #return b2a_hex(self.wkb).upper() + return b2a_hex(self.wkb).upper() @property def json(self):