Opened 16 years ago
Last modified 13 years ago
#7873 closed
GEOSGeometry equality operator fails on None — at Version 1
Reported by: | Owned by: | jbronn | |
---|---|---|---|
Component: | GIS | Version: | gis |
Severity: | Keywords: | geos equals | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
>>> from django.contrib.gis.geos import * >>> Point(0, 0) == None Traceback (most recent call last): File "<console>", line 1, in <module> File "/Library/Python/2.5/site-packages/django/contrib/gis/geos/base.py", line 170, in __eq__ return self.equals_exact(other) File "/Library/Python/2.5/site-packages/django/contrib/gis/geos/base.py", line 318, in equals_exact return geos_equalsexact(self.ptr, other.ptr, float(tolerance)) AttributeError: 'NoneType' object has no attribute 'ptr' >>>
Change History (2)
comment:1 by , 16 years ago
Description: | modified (diff) |
---|---|
Keywords: | equals added |
Owner: | changed from | to
by , 16 years ago
Attachment: | geos_eq.diff added |
---|
Note:
See TracTickets
for help on using tickets.
I agree that a
TypeError
should be raised instead -- at least an error is raised, so this is non-critical at the moment.