aboutsummaryrefslogtreecommitdiff
path: root/git/refs/symbolic.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2011-06-08 11:27:47 +0200
committerSebastian Thiel <byronimo@gmail.com>2011-06-08 11:27:47 +0200
commit74b13c58345d7a8225bbffdfe4d845bb1e703692 (patch)
treef1af7353208fb420ef2c8fe883fdf67690f9b656 /git/refs/symbolic.py
parentee9d6b97ad7d7bf6761161dc411258f2aa86d8c0 (diff)
downloadGitPython-74b13c58345d7a8225bbffdfe4d845bb1e703692.tar.gz
GitPython-74b13c58345d7a8225bbffdfe4d845bb1e703692.zip
symbolic reference handles different types for comparison more gracefully. Fixed possible issue in test_refs, which occurred in 0.3 previously
Diffstat (limited to 'git/refs/symbolic.py')
-rw-r--r--git/refs/symbolic.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/git/refs/symbolic.py b/git/refs/symbolic.py
index 8c3689b4..ec31f30c 100644
--- a/git/refs/symbolic.py
+++ b/git/refs/symbolic.py
@@ -64,7 +64,9 @@ class SymbolicReference(object):
return '<git.%s "%s">' % (self.__class__.__name__, self.path)
def __eq__(self, other):
- return self.path == other.path
+ if hasattr(other, 'path'):
+ return self.path == other.path
+ return False
def __ne__(self, other):
return not ( self == other )