summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTzu-ting <tzingshih@gmail.com>2019-02-07 12:36:40 +0800
committerSebastian Thiel <sebastian.thiel@icloud.com>2019-09-28 18:42:14 +0200
commit9121f629d43607f3827c99b5ea0fece356080cf0 (patch)
tree12024db3b72933b1d8817a9d813d7d8154b40093
parent882ebb153e14488b275e374ccebcdda1dea22dd7 (diff)
downloadgitpython-9121f629d43607f3827c99b5ea0fece356080cf0.tar.gz
add type check to git.Remote.__eq__
-rw-r--r--git/remote.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/git/remote.py b/git/remote.py
index 8b1c588d..73f10286 100644
--- a/git/remote.py
+++ b/git/remote.py
@@ -451,7 +451,7 @@ class Remote(LazyMixin, Iterable):
return '<git.%s "%s">' % (self.__class__.__name__, self.name)
def __eq__(self, other):
- return self.name == other.name
+ return isinstance(other, type(self)) and self.name == other.name
def __ne__(self, other):
return not (self == other)