summaryrefslogtreecommitdiff
path: root/lib/_range.py
diff options
context:
space:
mode:
authorChris Withers <chris@simplistix.co.uk>2013-05-26 21:58:39 +0100
committerChris Withers <chris@simplistix.co.uk>2013-05-26 21:58:39 +0100
commitb6a9e0ffaf4748d3019b8ab4bbcf9f794e49fc7a (patch)
tree6040b567de9e1643d71a94a94f81e476abe5e215 /lib/_range.py
parent8bb44f34441de2e2949a1021c25a4378a9a5c0b4 (diff)
downloadpsycopg2-b6a9e0ffaf4748d3019b8ab4bbcf9f794e49fc7a.tar.gz
raising an exception here rather than returning False causes problems with SQLAlchemy's internal state tracking
Diffstat (limited to 'lib/_range.py')
-rw-r--r--lib/_range.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/_range.py b/lib/_range.py
index 5803a8a..16b51a5 100644
--- a/lib/_range.py
+++ b/lib/_range.py
@@ -122,7 +122,7 @@ class Range(object):
def __eq__(self, other):
if not isinstance(other, self.__class__):
- raise TypeError('Cannot compare %r with %r' % (self, other))
+ return False
return (self._lower == other._lower
and self._upper == other._upper
and self._bounds == other._bounds)