Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0968971

Browse files
author
Julien Miotte
committed
Making comparisons with non-GitPython objects more tolerant.
1 parente7fa5ef commit0968971

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

‎git/objects/base.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,14 @@ def _set_cache_(self, attr):
7777

7878
def__eq__(self,other):
7979
""":return: True if the objects have the same SHA1"""
80+
ifnothasattr(other,'binsha'):
81+
returnFalse
8082
returnself.binsha==other.binsha
8183

8284
def__ne__(self,other):
8385
""":return: True if the objects do not have the same SHA1 """
86+
ifnothasattr(other,'binsha'):
87+
returnTrue
8488
returnself.binsha!=other.binsha
8589

8690
def__hash__(self):

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp