Improved error message while setting GeometryProxy

This commit is contained in:
Étienne Loks 2013-10-06 21:28:17 +02:00 committed by Claude Paroz
parent 1df3c49a1a
commit 8d75d1e1bc
1 changed files with 2 additions and 1 deletions

View File

@ -59,7 +59,8 @@ class GeometryProxy(object):
# Set with None, WKT, HEX, or WKB # Set with None, WKT, HEX, or WKB
pass pass
else: else:
raise TypeError('cannot set %s GeometryProxy with value of type: %s' % (obj.__class__.__name__, type(value))) raise TypeError('Cannot set %s GeometryProxy (%s) with value of type: %s' % (
obj.__class__.__name__, gtype, type(value)))
# Setting the objects dictionary with the value, and returning. # Setting the objects dictionary with the value, and returning.
obj.__dict__[self._field.attname] = value obj.__dict__[self._field.attname] = value