Skip to content

Commit 9121f62

Browse files
tzingByron
authored andcommitted
add type check to git.Remote.__eq__
1 parent 882ebb1 commit 9121f62

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git/remote.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ def __repr__(self):
451451
return '<git.%s "%s">' % (self.__class__.__name__, self.name)
452452

453453
def __eq__(self, other):
454-
return self.name == other.name
454+
return isinstance(other, type(self)) and self.name == other.name
455455

456456
def __ne__(self, other):
457457
return not (self == other)

0 commit comments

Comments
 (0)