Skip to content

Commit aab0bd5

Browse files
committed
PYTHON-962 - NotImplemented instead of NotImplementedError
1 parent 5140166 commit aab0bd5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pymongo/read_preferences.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def __eq__(self, other):
119119
if isinstance(other, _ServerMode):
120120
return (self.mode == other.mode and
121121
self.tag_sets == other.tag_sets)
122-
raise NotImplementedError
122+
return NotImplemented
123123

124124
def __ne__(self, other):
125125
return not self == other
@@ -161,7 +161,7 @@ def __repr__(self):
161161
def __eq__(self, other):
162162
if isinstance(other, _ServerMode):
163163
return other.mode == _PRIMARY
164-
raise NotImplementedError
164+
return NotImplemented
165165

166166

167167
class PrimaryPreferred(_ServerMode):

0 commit comments

Comments
 (0)