1
0
mirror of https://github.com/django/django.git synced 2024-12-27 03:25:58 +00:00

[py3] Minor fix in django.contrib.gis.

This commit is contained in:
Aymeric Augustin 2012-08-05 14:46:18 +02:00
parent 64e2e35627
commit 9e0a10ba77

View File

@ -40,7 +40,7 @@
""" """
# Python library requisites. # Python library requisites.
import sys 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 from ctypes import byref, string_at, c_char_p, c_double, c_ubyte, c_void_p
# Getting GDAL prerequisites # Getting GDAL prerequisites
@ -322,8 +322,7 @@ class OGRGeometry(GDALBase):
@property @property
def hex(self): def hex(self):
"Returns the hexadecimal representation of the WKB (a string)." "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 @property
def json(self): def json(self):